mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-03-21 22:39:39 +00:00
deploy: 26424aa80b
This commit is contained in:
21
archive/index.html
Normal file
21
archive/index.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="theme-color" content="#3131DC"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>PMTiles archive inspector</title>
|
||||
<link rel="preconnect" href="https://api.protomaps.com"/>
|
||||
<link rel="preconnect" href="https://protomaps.github.io"/>
|
||||
<link rel="preconnect" href="https://unpkg.com"/>
|
||||
<link rel="preconnect" href="https://demo-bucket.protomaps.com"/>
|
||||
<script type="module" crossorigin src="/assets/archive-BrR00yMZ.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/assets/Frame-_0hG118X.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/index-CAhF7OQY.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/Frame-BpBOn-1w.css">
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-DwUhsmFz.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
||||
1
assets/Frame-BpBOn-1w.css
Normal file
1
assets/Frame-BpBOn-1w.css
Normal file
File diff suppressed because one or more lines are too long
1
assets/Frame-_0hG118X.js
Normal file
1
assets/Frame-_0hG118X.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/LayersPanel-DHglLXEr.js
Normal file
1
assets/LayersPanel-DHglLXEr.js
Normal file
@@ -0,0 +1 @@
|
||||
import{i as l,c as u,S as C,f as F,x as S,l as d,d as P,b as A,e as I,h as $,u as O,k as T,s as E}from"./Frame-_0hG118X.js";var B=d('<div class="max-h-120 overflow-y-scroll max-w-200 divide-y app-divide">'),D=d('<div class=p-2><div> <span class=app-text-light></span></div><div class="text-xs font-mono app-text-light"></div><table class="font-mono table-auto border-separate border-spacing-x-2"><tbody>'),N=d('<tr><td class="text-right app-text-light break-keep"></td><td class=break-all>');const R=e=>e===1?"Point":e===2?"LineString":"Polygon",H=e=>(()=>{var o=B();return l(o,u(S,{get each(){return e.features},children:n=>(()=>{var x=D(),y=x.firstChild,m=y.firstChild,L=m.nextSibling,i=y.nextSibling,r=i.nextSibling,t=r.firstChild;return l(y,()=>n.layerName,m),l(L,()=>R(n.type)),l(i,u(C,{get when(){return n.id!==void 0},fallback:"missing ID",get children(){return["ID ",F(()=>n.id)]}})),l(t,u(S,{get each(){return Object.entries(n.properties)},children:([b,s])=>(()=>{var f=N(),a=f.firstChild,h=a.nextSibling;return l(a,b),l(h,()=>typeof s=="boolean"?JSON.stringify(s):s.toString()),f})()})),x})()})),o})();var j=d('<div><input type=checkbox id=background><label class="ml-2 text-sm"for=background>Background'),G=d('<div class="px-2 md:px-4 pb-2 md:pb-4"><div><input type=checkbox id=checkall><label class="ml-2 text-sm"for=checkall>All Layers'),J=d('<div class="app-bg rounded app-border flex flex-col overflow-y-scroll max-h-100"><button type=button class="app-well cursor-pointer min-w-8">'),M=d('<div class=ml-2><input type=checkbox><label class="ml-2 text-sm"><span class="inline-block mr-2 w-[10px] h-[10px]">'),q=d("<span class=ml-1>(<!>)");function K(e){let o;const[n,x]=A(!0),y=i=>{const r=e.layerVisibility().map(t=>t.id===i?{...t,visible:!t.visible}:t);e.setLayerVisibility(r)},m=F(()=>e.layerVisibility().filter(r=>r.visible).length===e.layerVisibility().length),L=()=>{e.setLayerVisibility(e.layerVisibility().map(i=>({...i,visible:!m()})))};return I(()=>{const i=e.layerVisibility().filter(t=>t.visible).length,r=i>0&&i!==e.layerVisibility().length;o&&(o.indeterminate=r)}),(()=>{var i=J(),r=i.firstChild;return r.$$click=()=>x(!n()),l(r,()=>n()?"-":"+"),l(i,u(C,{get when(){return n()},get children(){var t=G(),b=t.firstChild,s=b.firstChild;l(t,u(C,{get when(){return e.basemapOption},get children(){var a=j(),h=a.firstChild;return h.addEventListener("change",()=>e.setBasemap?.(!e.basemap?.())),$(()=>h.checked=e.basemap?.()),a}}),b),s.addEventListener("change",L);var f=o;return typeof f=="function"?O(f,s):o=s,l(t,u(S,{get each(){return e.layerVisibility()},children:(a,h)=>(()=>{var w=M(),_=w.firstChild,p=_.nextSibling,V=p.firstChild;return _.addEventListener("change",()=>y(a.id)),l(p,()=>a.id,null),l(p,u(C,{get when(){return e.layerFeatureCounts},children:c=>(()=>{var v=q(),k=v.firstChild,g=k.nextSibling;return g.nextSibling,l(v,()=>c()[a.id]||0,g),v})()}),null),$(c=>{var v=`check_${a.id}`,k=`check_${a.id}`,g=T(h());return v!==c.e&&E(_,"id",c.e=v),k!==c.t&&E(p,"for",c.t=k),g!==c.a&&((c.a=g)!=null?V.style.setProperty("background-color",g):V.style.removeProperty("background-color")),c},{e:void 0,t:void 0,a:void 0}),$(()=>_.checked=a.visible),w})()}),null),$(()=>s.checked=m()),t}}),null),$(t=>{var b=!!n(),s=!n();return b!==t.e&&r.classList.toggle("rounded-t",t.e=b),s!==t.t&&r.classList.toggle("rounded",t.t=s),t},{e:void 0,t:void 0}),i})()}P(["click"]);export{H as F,K as L};
|
||||
1
assets/archive-BrR00yMZ.js
Normal file
1
assets/archive-BrR00yMZ.js
Normal file
File diff suppressed because one or more lines are too long
822
assets/index-CAhF7OQY.js
Normal file
822
assets/index-CAhF7OQY.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/index-DwUhsmFz.css
Normal file
1
assets/index-DwUhsmFz.css
Normal file
File diff suppressed because one or more lines are too long
165
assets/map-CEKlbm8H.js
Normal file
165
assets/map-CEKlbm8H.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/tile-BQ02WL-K.js
Normal file
1
assets/tile-BQ02WL-K.js
Normal file
File diff suppressed because one or more lines are too long
719
cloudformation-stack.yaml
Normal file
719
cloudformation-stack.yaml
Normal file
@@ -0,0 +1,719 @@
|
||||
AWSTemplateFormatVersion: 2010-09-09
|
||||
Description: Serve Z/X/Y tiles through CloudFront + Lambda from an existing S3 bucket.
|
||||
Parameters:
|
||||
BucketName:
|
||||
Description: >-
|
||||
Name of an existing S3 bucket with .pmtiles tilesets. Should be in the
|
||||
same region as your CloudFormation stack. Can be a RequesterPays bucket in
|
||||
another account.
|
||||
Type: String
|
||||
MinLength: 1
|
||||
DefaultTTL:
|
||||
Description: Default time-to-live for cached tiles in the CloudFront distribution.
|
||||
Type: Number
|
||||
Default: 86400
|
||||
AllowedOrigins:
|
||||
Description: >-
|
||||
Comma-separated list of domains (e.g. example.com) allowed by browser CORS
|
||||
policy, or * for all origins.
|
||||
Type: List<String>
|
||||
Default: '*'
|
||||
PublicHostname:
|
||||
Description: >-
|
||||
Optional. Replace *.cloudfront.net in TileJSON with a custom hostname
|
||||
(e.g. example.com). See docs on how this value is cached.
|
||||
Type: String
|
||||
Outputs:
|
||||
CloudFrontDistributionUrl:
|
||||
Description: URL of the CloudFront distribution for cached tiles.
|
||||
Value: !Sub https://${CloudFrontDistribution.DomainName}
|
||||
Export:
|
||||
Name: !Sub ${AWS::StackName}-CloudFrontDistributionURL
|
||||
Conditions:
|
||||
IsPublicHostnameProvided: !Not
|
||||
- !Equals
|
||||
- !Ref PublicHostname
|
||||
- ''
|
||||
Resources:
|
||||
LogGroup:
|
||||
Type: AWS::Logs::LogGroup
|
||||
Properties:
|
||||
LogGroupName: !Sub /aws/lambda/${AWS::StackName}
|
||||
RetentionInDays: 7
|
||||
LambdaExecutionRole:
|
||||
Type: AWS::IAM::Role
|
||||
Properties:
|
||||
AssumeRolePolicyDocument:
|
||||
Version: 2012-10-17
|
||||
Statement:
|
||||
- Effect: Allow
|
||||
Principal:
|
||||
Service: lambda.amazonaws.com
|
||||
Action: sts:AssumeRole
|
||||
Policies:
|
||||
- PolicyName: !Sub ${AWS::StackName}-LambdaLoggingPolicy
|
||||
PolicyDocument:
|
||||
Version: 2012-10-17
|
||||
Statement:
|
||||
- Effect: Allow
|
||||
Action:
|
||||
- logs:CreateLogStream
|
||||
- logs:PutLogEvents
|
||||
Resource: !Sub >-
|
||||
arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/${AWS::StackName}:log-stream:*
|
||||
- PolicyName: !Sub ${AWS::StackName}-LambdaS3AccessPolicy
|
||||
PolicyDocument:
|
||||
Version: 2012-10-17
|
||||
Statement:
|
||||
- Effect: Allow
|
||||
Action: s3:GetObject
|
||||
Resource: !Sub arn:aws:s3:::${BucketName}/*
|
||||
LambdaFunctionUrl:
|
||||
Type: AWS::Lambda::Url
|
||||
Properties:
|
||||
AuthType: NONE
|
||||
TargetFunctionArn: !GetAtt LambdaFunction.Arn
|
||||
InvokeMode: BUFFERED
|
||||
LambdaFunctionUrlPermissionInvokeUrl:
|
||||
Type: AWS::Lambda::Permission
|
||||
Properties:
|
||||
Action: lambda:InvokeFunctionUrl
|
||||
FunctionName: !Ref LambdaFunction
|
||||
Principal: '*'
|
||||
FunctionUrlAuthType: NONE
|
||||
LambdaFunctionUrlPermissionInvokeFunction:
|
||||
Type: AWS::Lambda::Permission
|
||||
Properties:
|
||||
Action: lambda:InvokeFunction
|
||||
FunctionName: !Ref LambdaFunction
|
||||
Principal: '*'
|
||||
ViewerRequestCloudFrontFunction:
|
||||
Type: AWS::CloudFront::Function
|
||||
Properties:
|
||||
Name: !Sub ${AWS::StackName}-ViewerRequestCloudFrontFunction
|
||||
AutoPublish: true
|
||||
FunctionCode: |
|
||||
function handler(event) {
|
||||
const request = event.request;
|
||||
request.headers['x-distribution-domain-name'] = { value: event.context.distributionDomainName };
|
||||
return request;
|
||||
}
|
||||
FunctionConfig:
|
||||
Comment: Add x-distribution-domain header.
|
||||
Runtime: cloudfront-js-2.0
|
||||
CloudFrontDistribution:
|
||||
Type: AWS::CloudFront::Distribution
|
||||
DeletionPolicy: Delete
|
||||
Properties:
|
||||
DistributionConfig:
|
||||
Origins:
|
||||
- Id: LambdaOrigin
|
||||
DomainName: !Select
|
||||
- 2
|
||||
- !Split
|
||||
- /
|
||||
- !GetAtt LambdaFunctionUrl.FunctionUrl
|
||||
CustomOriginConfig:
|
||||
OriginProtocolPolicy: https-only
|
||||
DefaultCacheBehavior:
|
||||
TargetOriginId: LambdaOrigin
|
||||
ViewerProtocolPolicy: redirect-to-https
|
||||
CachePolicyId: !Ref CachePolicyId
|
||||
ResponseHeadersPolicyId: !Ref ResponseHeadersPolicyId
|
||||
OriginRequestPolicyId: b689b0a8-53d0-40ab-baf2-68738e2966ac
|
||||
FunctionAssociations: !If
|
||||
- IsPublicHostnameProvided
|
||||
- !Ref AWS::NoValue
|
||||
- - EventType: viewer-request
|
||||
FunctionARN: !GetAtt ViewerRequestCloudFrontFunction.FunctionARN
|
||||
Enabled: true
|
||||
HttpVersion: http2and3
|
||||
Comment: CloudFront Distribution
|
||||
PriceClass: PriceClass_All
|
||||
CachePolicyId:
|
||||
Type: AWS::CloudFront::CachePolicy
|
||||
Properties:
|
||||
CachePolicyConfig:
|
||||
Name: !Sub ${AWS::StackName}-CachePolicyConfig
|
||||
DefaultTTL: !Ref DefaultTTL
|
||||
MaxTTL: 31536000
|
||||
MinTTL: 0
|
||||
ParametersInCacheKeyAndForwardedToOrigin:
|
||||
EnableAcceptEncodingBrotli: true
|
||||
EnableAcceptEncodingGzip: true
|
||||
HeadersConfig:
|
||||
HeaderBehavior: none
|
||||
CookiesConfig:
|
||||
CookieBehavior: none
|
||||
QueryStringsConfig:
|
||||
QueryStringBehavior: none
|
||||
ResponseHeadersPolicyId:
|
||||
Type: AWS::CloudFront::ResponseHeadersPolicy
|
||||
Properties:
|
||||
ResponseHeadersPolicyConfig:
|
||||
Name: !Sub ${AWS::StackName}-ResponseHeadersPolicyConfig
|
||||
CorsConfig:
|
||||
AccessControlAllowOrigins:
|
||||
Items: !Ref AllowedOrigins
|
||||
AccessControlAllowHeaders:
|
||||
Items:
|
||||
- '*'
|
||||
AccessControlAllowMethods:
|
||||
Items:
|
||||
- GET
|
||||
- HEAD
|
||||
- OPTIONS
|
||||
AccessControlExposeHeaders:
|
||||
Items:
|
||||
- ETag
|
||||
AccessControlAllowCredentials: false
|
||||
OriginOverride: true
|
||||
Comment: CORS policy for Protomaps
|
||||
LambdaFunction:
|
||||
Type: AWS::Lambda::Function
|
||||
Properties:
|
||||
FunctionName: !Sub ${AWS::StackName}-LambdaFunction
|
||||
Runtime: nodejs22.x
|
||||
Architectures:
|
||||
- arm64
|
||||
Role: !GetAtt LambdaExecutionRole.Arn
|
||||
Handler: index.handler
|
||||
MemorySize: 512
|
||||
LoggingConfig:
|
||||
LogGroup: !Ref LogGroup
|
||||
Environment:
|
||||
Variables:
|
||||
BUCKET: !Ref BucketName
|
||||
PUBLIC_HOSTNAME: !Ref PublicHostname
|
||||
Code:
|
||||
ZipFile: >
|
||||
//sha:26424aa
|
||||
|
||||
"use strict";var fr=Object.create;var re=Object.defineProperty;var
|
||||
vr=Object.getOwnPropertyDescriptor;var
|
||||
pr=Object.getOwnPropertyNames;var
|
||||
gr=Object.getPrototypeOf,dr=Object.prototype.hasOwnProperty;var
|
||||
K=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),mr=(t,e)=>{for(var
|
||||
r in e)re(t,r,{get:e[r],enumerable:!0})},je=(t,e,r,n)=>{if(e&&typeof
|
||||
e=="object"||typeof e=="function")for(let i of
|
||||
pr(e))!dr.call(t,i)&&i!==r&&re(t,i,{get:()=>e[i],enumerable:!(n=vr(e,i))||n.enumerable});return
|
||||
t};var
|
||||
Be=(t,e,r)=>(r=t!=null?fr(gr(t)):{},je(e||!t||!t.__esModule?re(r,"default",{value:t,enumerable:!0}):r,t)),yr=t=>je(re({},"__esModule",{value:!0}),t);var
|
||||
xt=K((xi,wt)=>{var
|
||||
oe=Object.defineProperty,Jr=Object.getOwnPropertyDescriptor,Qr=Object.getOwnPropertyNames,Yr=Object.prototype.hasOwnProperty,se=(t,e)=>oe(t,"name",{value:e,configurable:!0}),Xr=(t,e)=>{for(var
|
||||
r in e)oe(t,r,{get:e[r],enumerable:!0})},en=(t,e,r,n)=>{if(e&&typeof
|
||||
e=="object"||typeof e=="function")for(let i of
|
||||
Qr(e))!Yr.call(t,i)&&i!==r&&oe(t,i,{get:()=>e[i],enumerable:!(n=Jr(e,i))||n.enumerable});return
|
||||
t},tn=t=>en(oe({},"__esModule",{value:!0}),t),ht={};Xr(ht,{AlgorithmId:()=>gt,EndpointURLScheme:()=>pt,FieldPosition:()=>dt,HttpApiKeyAuthLocation:()=>vt,HttpAuthLocation:()=>ft,IniSectionType:()=>mt,RequestHandlerProtocol:()=>yt,SMITHY_CONTEXT_KEY:()=>an,getDefaultClientConfiguration:()=>on,resolveDefaultRuntimeConfig:()=>sn});wt.exports=tn(ht);var
|
||||
ft=(t=>(t.HEADER="header",t.QUERY="query",t))(ft||{}),vt=(t=>(t.HEADER="header",t.QUERY="query",t))(vt||{}),pt=(t=>(t.HTTP="http",t.HTTPS="https",t))(pt||{}),gt=(t=>(t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256",t))(gt||{}),rn=se(t=>{let
|
||||
e=[];return t.sha256!==void
|
||||
0&&e.push({algorithmId:()=>"sha256",checksumConstructor:()=>t.sha256}),t.md5!=null&&e.push({algorithmId:()=>"md5",checksumConstructor:()=>t.md5}),{_checksumAlgorithms:e,addChecksumAlgorithm(r){this._checksumAlgorithms.push(r)},checksumAlgorithms(){return
|
||||
this._checksumAlgorithms}}},"getChecksumConfiguration"),nn=se(t=>{let
|
||||
e={};return
|
||||
t.checksumAlgorithms().forEach(r=>{e[r.algorithmId()]=r.checksumConstructor()}),e},"resolveChecksumRuntimeConfig"),on=se(t=>({...rn(t)}),"getDefaultClientConfiguration"),sn=se(t=>({...nn(t)}),"resolveDefaultRuntimeConfig"),dt=(t=>(t[t.HEADER=0]="HEADER",t[t.TRAILER=1]="TRAILER",t))(dt||{}),an="__smithy_context",mt=(t=>(t.PROFILE="profile",t.SSO_SESSION="sso-session",t.SERVICES="services",t))(mt||{}),yt=(t=>(t.HTTP_0_9="http/0.9",t.HTTP_1_0="http/1.0",t.TDS_8_0="tds/8.0",t))(yt||{})});var
|
||||
zt=K((Ei,St)=>{var
|
||||
ae=Object.defineProperty,ln=Object.getOwnPropertyDescriptor,un=Object.getOwnPropertyNames,cn=Object.prototype.hasOwnProperty,N=(t,e)=>ae(t,"name",{value:e,configurable:!0}),hn=(t,e)=>{for(var
|
||||
r in e)ae(t,r,{get:e[r],enumerable:!0})},fn=(t,e,r,n)=>{if(e&&typeof
|
||||
e=="object"||typeof e=="function")for(let i of
|
||||
un(e))!cn.call(t,i)&&i!==r&&ae(t,i,{get:()=>e[i],enumerable:!(n=ln(e,i))||n.enumerable});return
|
||||
t},vn=t=>fn(ae({},"__esModule",{value:!0}),t),Ct={};hn(Ct,{Field:()=>dn,Fields:()=>mn,HttpRequest:()=>yn,HttpResponse:()=>wn,IHttpRequest:()=>Tt.HttpRequest,getHttpHandlerExtensionConfiguration:()=>pn,isValidHostname:()=>_t,resolveHttpHandlerRuntimeConfig:()=>gn});St.exports=vn(Ct);var
|
||||
pn=N(t=>{let
|
||||
e=t.httpHandler;return{setHttpHandler(r){e=r},httpHandler(){return
|
||||
e},updateHttpClientConfig(r,n){e.updateHttpClientConfig(r,n)},httpHandlerConfigs(){return
|
||||
e.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),gn=N(t=>({httpHandler:t.httpHandler()}),"resolveHttpHandlerRuntimeConfig"),Tt=xt(),bt=class{constructor({name:e,kind:r=Tt.FieldPosition.HEADER,values:n=[]}){this.name=e,this.kind=r,this.values=n}add(e){this.values.push(e)}set(e){this.values=e}remove(e){this.values=this.values.filter(r=>r!==e)}toString(){return
|
||||
this.values.map(e=>e.includes(",")||e.includes("
|
||||
")?`"${e}"`:e).join(", ")}get(){return this.values}};N(bt,"Field");var
|
||||
dn=bt,Et=class{constructor({fields:e=[],encoding:r="utf-8"}){this.entries={},e.forEach(this.setField.bind(this)),this.encoding=r}setField(e){this.entries[e.name.toLowerCase()]=e}getField(e){return
|
||||
this.entries[e.toLowerCase()]}removeField(e){delete
|
||||
this.entries[e.toLowerCase()]}getByType(e){return
|
||||
Object.values(this.entries).filter(r=>r.kind===e)}};N(Et,"Fields");var
|
||||
mn=Et,At=class
|
||||
Te{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static
|
||||
clone(e){let r=new Te({...e,headers:{...e.headers}});return
|
||||
r.query&&(r.query=Pt(r.query)),r}static
|
||||
isInstance(e){if(!e)return!1;let r=e;return"method"in r&&"protocol"in
|
||||
r&&"hostname"in r&&"path"in r&&typeof r.query=="object"&&typeof
|
||||
r.headers=="object"}clone(){return
|
||||
Te.clone(this)}};N(At,"HttpRequest");var yn=At;function Pt(t){return
|
||||
Object.keys(t).reduce((e,r)=>{let
|
||||
n=t[r];return{...e,[r]:Array.isArray(n)?[...n]:n}},{})}N(Pt,"cloneQuery");var
|
||||
Ht=class{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static
|
||||
isInstance(e){if(!e)return!1;let r=e;return typeof
|
||||
r.statusCode=="number"&&typeof
|
||||
r.headers=="object"}};N(Ht,"HttpResponse");var wn=Ht;function
|
||||
_t(t){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(t)}N(_t,"isValidHostname")});var
|
||||
Ut=K((Ai,Rt)=>{var
|
||||
le=Object.defineProperty,xn=Object.getOwnPropertyDescriptor,Cn=Object.getOwnPropertyNames,Tn=Object.prototype.hasOwnProperty,be=(t,e)=>le(t,"name",{value:e,configurable:!0}),bn=(t,e)=>{for(var
|
||||
r in e)le(t,r,{get:e[r],enumerable:!0})},En=(t,e,r,n)=>{if(e&&typeof
|
||||
e=="object"||typeof e=="function")for(let i of
|
||||
Cn(e))!Tn.call(t,i)&&i!==r&&le(t,i,{get:()=>e[i],enumerable:!(n=xn(e,i))||n.enumerable});return
|
||||
t},An=t=>En(le({},"__esModule",{value:!0}),t),Ot={};bn(Ot,{escapeUri:()=>Mt,escapeUriPath:()=>Hn});Rt.exports=An(Ot);var
|
||||
Mt=be(t=>encodeURIComponent(t).replace(/[!'()*]/g,Pn),"escapeUri"),Pn=be(t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),Hn=be(t=>t.split("/").map(Mt).join("/"),"escapeUriPath")});var
|
||||
It=K((Pi,kt)=>{var
|
||||
ue=Object.defineProperty,_n=Object.getOwnPropertyDescriptor,Sn=Object.getOwnPropertyNames,zn=Object.prototype.hasOwnProperty,On=(t,e)=>ue(t,"name",{value:e,configurable:!0}),Mn=(t,e)=>{for(var
|
||||
r in e)ue(t,r,{get:e[r],enumerable:!0})},Rn=(t,e,r,n)=>{if(e&&typeof
|
||||
e=="object"||typeof e=="function")for(let i of
|
||||
Sn(e))!zn.call(t,i)&&i!==r&&ue(t,i,{get:()=>e[i],enumerable:!(n=_n(e,i))||n.enumerable});return
|
||||
t},Un=t=>Rn(ue({},"__esModule",{value:!0}),t),Dt={};Mn(Dt,{buildQueryString:()=>Lt});kt.exports=Un(Dt);var
|
||||
Ee=Ut();function Lt(t){let e=[];for(let r of
|
||||
Object.keys(t).sort()){let
|
||||
n=t[r];if(r=(0,Ee.escapeUri)(r),Array.isArray(n))for(let
|
||||
i=0,o=n.length;i<o;i++)e.push(`${r}=${(0,Ee.escapeUri)(n[i])}`);else{let
|
||||
i=r;(n||typeof
|
||||
n=="string")&&(i+=`=${(0,Ee.escapeUri)(n)}`),e.push(i)}}return
|
||||
e.join("&")}On(Lt,"buildQueryString")});var rr=K((zi,tr)=>{var
|
||||
Dn=Object.create,ee=Object.defineProperty,Ln=Object.getOwnPropertyDescriptor,kn=Object.getOwnPropertyNames,In=Object.getPrototypeOf,Nn=Object.prototype.hasOwnProperty,C=(t,e)=>ee(t,"name",{value:e,configurable:!0}),jn=(t,e)=>{for(var
|
||||
r in e)ee(t,r,{get:e[r],enumerable:!0})},Bt=(t,e,r,n)=>{if(e&&typeof
|
||||
e=="object"||typeof e=="function")for(let i of
|
||||
kn(e))!Nn.call(t,i)&&i!==r&&ee(t,i,{get:()=>e[i],enumerable:!(n=Ln(e,i))||n.enumerable});return
|
||||
t},Bn=(t,e,r)=>(r=t!=null?Dn(In(t)):{},Bt(e||!t||!t.__esModule?ee(r,"default",{value:t,enumerable:!0}):r,t)),$n=t=>Bt(ee({},"__esModule",{value:!0}),t),$t={};jn($t,{DEFAULT_REQUEST_TIMEOUT:()=>Kn,NodeHttp2Handler:()=>Yn,NodeHttpHandler:()=>Wn,streamCollector:()=>ei});tr.exports=$n($t);var
|
||||
Ft=zt(),qt=It(),Ae=require("http"),Pe=require("https"),Fn=["ECONNRESET","EPIPE","ETIMEDOUT"],Zt=C(t=>{let
|
||||
e={};for(let r of Object.keys(t)){let
|
||||
n=t[r];e[r]=Array.isArray(n)?n.join(","):n}return
|
||||
e},"getTransformedHeaders"),qn=C((t,e,r=0)=>{if(!r)return;let
|
||||
n=setTimeout(()=>{t.destroy(),e(Object.assign(new Error(`Socket timed
|
||||
out without establishing a connection within ${r}
|
||||
ms`),{name:"TimeoutError"}))},r);t.on("socket",i=>{i.connecting?i.on("connect",()=>{clearTimeout(n)}):clearTimeout(n)})},"setConnectionTimeout"),Zn=C((t,{keepAlive:e,keepAliveMsecs:r})=>{e===!0&&t.on("socket",n=>{n.setKeepAlive(e,r||0)})},"setSocketKeepAlive"),Gn=C((t,e,r=0)=>{t.setTimeout(r,()=>{t.destroy(),e(Object.assign(new
|
||||
Error(`Connection timed out after ${r}
|
||||
ms`),{name:"TimeoutError"}))})},"setSocketTimeout"),Gt=require("stream"),Nt=1e3;async
|
||||
function _e(t,e,r=Nt){let
|
||||
n=e.headers??{},i=n.Expect||n.expect,o=-1,s=!1;i==="100-continue"&&await
|
||||
Promise.race([new
|
||||
Promise(a=>{o=Number(setTimeout(a,Math.max(Nt,r)))}),new
|
||||
Promise(a=>{t.on("continue",()=>{clearTimeout(o),a()}),t.on("error",()=>{s=!0,clearTimeout(o),a()})})]),s||Kt(t,e.body)}C(_e,"writeRequestBody");function
|
||||
Kt(t,e){if(e instanceof
|
||||
Gt.Readable){e.pipe(t);return}if(e){if(Buffer.isBuffer(e)||typeof
|
||||
e=="string"){t.end(e);return}let r=e;if(typeof
|
||||
r=="object"&&r.buffer&&typeof r.byteOffset=="number"&&typeof
|
||||
r.byteLength=="number"){t.end(Buffer.from(r.buffer,r.byteOffset,r.byteLength));return}t.end(Buffer.from(e));return}t.end()}C(Kt,"writeBody");var
|
||||
Kn=0,Wt=class
|
||||
He{constructor(e){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new
|
||||
Promise((r,n)=>{typeof
|
||||
e=="function"?e().then(i=>{r(this.resolveDefaultConfig(i))}).catch(n):r(this.resolveDefaultConfig(e))})}static
|
||||
create(e){return typeof e?.handle=="function"?e:new He(e)}static
|
||||
checkSocketUsage(e,r,n=console){var
|
||||
i,o,s;let{sockets:a,requests:l,maxSockets:h}=e;if(typeof
|
||||
h!="number"||h===1/0||Date.now()-15e3<r)return r;if(a&&l)for(let u in
|
||||
a){let c=((i=a[u])==null?void 0:i.length)??0,y=((o=l[u])==null?void
|
||||
0:o.length)??0;if(c>=h&&y>=2*h)return(s=n?.warn)==null||s.call(n,`@smithy/node-http-handler:WARN
|
||||
- socket usage at capacity=${c} and ${y} additional requests are
|
||||
enqueued.
|
||||
|
||||
See
|
||||
https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
||||
|
||||
or increase socketAcquisitionWarningTimeout=(millis) in the
|
||||
NodeHttpHandler config.`),Date.now()}return
|
||||
r}resolveDefaultConfig(e){let{requestTimeout:r,connectionTimeout:n,socketTimeout:i,httpAgent:o,httpsAgent:s}=e||{},a=!0,l=50;return{connectionTimeout:n,requestTimeout:r??i,httpAgent:o
|
||||
instanceof Ae.Agent||typeof o?.destroy=="function"?o:new
|
||||
Ae.Agent({keepAlive:a,maxSockets:l,...o}),httpsAgent:s instanceof
|
||||
Pe.Agent||typeof s?.destroy=="function"?s:new
|
||||
Pe.Agent({keepAlive:a,maxSockets:l,...s}),logger:console}}destroy(){var
|
||||
e,r,n,i;(r=(e=this.config)==null?void
|
||||
0:e.httpAgent)==null||r.destroy(),(i=(n=this.config)==null?void
|
||||
0:n.httpsAgent)==null||i.destroy()}async
|
||||
handle(e,{abortSignal:r}={}){this.config||(this.config=await
|
||||
this.configProvider);let n;return new Promise((i,o)=>{let s,a=C(async
|
||||
p=>{await s,clearTimeout(n),i(p)},"resolve"),l=C(async p=>{await
|
||||
s,clearTimeout(n),o(p)},"reject");if(!this.config)throw new
|
||||
Error("Node HTTP request handler config is not
|
||||
resolved");if(r?.aborted){let p=new Error("Request
|
||||
aborted");p.name="AbortError",l(p);return}let
|
||||
h=e.protocol==="https:",f=h?this.config.httpsAgent:this.config.httpAgent;n=setTimeout(()=>{this.socketWarningTimestamp=He.checkSocketUsage(f,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2e3)+(this.config.connectionTimeout??1e3));let
|
||||
u=(0,qt.buildQueryString)(e.query||{}),c;if(e.username!=null||e.password!=null){let
|
||||
p=e.username??"",x=e.password??"";c=`${p}:${x}`}let
|
||||
y=e.path;u&&(y+=`?${u}`),e.fragment&&(y+=`#${e.fragment}`);let
|
||||
T={headers:e.headers,host:e.hostname,method:e.method,path:y,port:e.port,agent:f,auth:c},w=(h?Pe.request:Ae.request)(T,p=>{let
|
||||
x=new
|
||||
Ft.HttpResponse({statusCode:p.statusCode||-1,reason:p.statusMessage,headers:Zt(p.headers),body:p});a({response:x})});if(w.on("error",p=>{Fn.includes(p.code)?l(Object.assign(p,{name:"TimeoutError"})):l(p)}),qn(w,l,this.config.connectionTimeout),Gn(w,l,this.config.requestTimeout),r){let
|
||||
p=C(()=>{w.destroy();let x=new Error("Request
|
||||
aborted");x.name="AbortError",l(x)},"onAbort");if(typeof
|
||||
r.addEventListener=="function"){let
|
||||
x=r;x.addEventListener("abort",p,{once:!0}),w.once("close",()=>x.removeEventListener("abort",p))}else
|
||||
r.onabort=p}let H=T.agent;typeof H=="object"&&"keepAlive"in
|
||||
H&&Zn(w,{keepAlive:H.keepAlive,keepAliveMsecs:H.keepAliveMsecs}),s=_e(w,e,this.config.requestTimeout).catch(p=>(clearTimeout(n),o(p)))})}updateHttpClientConfig(e,r){this.config=void
|
||||
0,this.configProvider=this.configProvider.then(n=>({...n,[e]:r}))}httpHandlerConfigs(){return
|
||||
this.config??{}}};C(Wt,"NodeHttpHandler");var
|
||||
Wn=Wt,jt=require("http2"),Vn=Bn(require("http2")),Vt=class{constructor(e){this.sessions=[],this.sessions=e??[]}poll(){if(this.sessions.length>0)return
|
||||
this.sessions.shift()}offerLast(e){this.sessions.push(e)}contains(e){return
|
||||
this.sessions.includes(e)}remove(e){this.sessions=this.sessions.filter(r=>r!==e)}[Symbol.iterator](){return
|
||||
this.sessions[Symbol.iterator]()}destroy(e){for(let r of
|
||||
this.sessions)r===e&&(r.destroyed||r.destroy())}};C(Vt,"NodeHttp2ConnectionPool");var
|
||||
Jn=Vt,Jt=class{constructor(e){if(this.sessionCache=new
|
||||
Map,this.config=e,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw
|
||||
new RangeError("maxConcurrency must be greater than
|
||||
zero.")}lease(e,r){let
|
||||
n=this.getUrlString(e),i=this.sessionCache.get(n);if(i){let
|
||||
l=i.poll();if(l&&!this.config.disableConcurrency)return l}let
|
||||
o=Vn.default.connect(n);this.config.maxConcurrency&&o.settings({maxConcurrentStreams:this.config.maxConcurrency},l=>{if(l)throw
|
||||
new Error("Fail to set maxConcurrentStreams to
|
||||
"+this.config.maxConcurrency+"when creating new session for
|
||||
"+e.destination.toString())}),o.unref();let
|
||||
s=C(()=>{o.destroy(),this.deleteSession(n,o)},"destroySessionCb");o.on("goaway",s),o.on("error",s),o.on("frameError",s),o.on("close",()=>this.deleteSession(n,o)),r.requestTimeout&&o.setTimeout(r.requestTimeout,s);let
|
||||
a=this.sessionCache.get(n)||new Jn;return
|
||||
a.offerLast(o),this.sessionCache.set(n,a),o}deleteSession(e,r){let
|
||||
n=this.sessionCache.get(e);n&&n.contains(r)&&(n.remove(r),this.sessionCache.set(e,n))}release(e,r){var
|
||||
n;let
|
||||
i=this.getUrlString(e);(n=this.sessionCache.get(i))==null||n.offerLast(r)}destroy(){for(let[e,r]of
|
||||
this.sessionCache){for(let n of
|
||||
r)n.destroyed||n.destroy(),r.remove(n);this.sessionCache.delete(e)}}setMaxConcurrentStreams(e){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw
|
||||
new RangeError("maxConcurrentStreams must be greater than
|
||||
zero.");this.config.maxConcurrency=e}setDisableConcurrentStreams(e){this.config.disableConcurrency=e}getUrlString(e){return
|
||||
e.destination.toString()}};C(Jt,"NodeHttp2ConnectionManager");var
|
||||
Qn=Jt,Qt=class
|
||||
Yt{constructor(e){this.metadata={handlerProtocol:"h2"},this.connectionManager=new
|
||||
Qn({}),this.configProvider=new Promise((r,n)=>{typeof
|
||||
e=="function"?e().then(i=>{r(i||{})}).catch(n):r(e||{})})}static
|
||||
create(e){return typeof e?.handle=="function"?e:new
|
||||
Yt(e)}destroy(){this.connectionManager.destroy()}async
|
||||
handle(e,{abortSignal:r}={}){this.config||(this.config=await
|
||||
this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams&&this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams));let{requestTimeout:n,disableConcurrentStreams:i}=this.config;return
|
||||
new Promise((o,s)=>{var a;let l=!1,h,f=C(async g=>{await
|
||||
h,o(g)},"resolve"),u=C(async g=>{await
|
||||
h,s(g)},"reject");if(r?.aborted){l=!0;let g=new Error("Request
|
||||
aborted");g.name="AbortError",u(g);return}let{hostname:c,method:y,port:T,protocol:m,query:w}=e,H="";if(e.username!=null||e.password!=null){let
|
||||
g=e.username??"",A=e.password??"";H=`${g}:${A}@`}let
|
||||
p=`${m}//${H}${c}${T?`:${T}`:""}`,x={destination:new
|
||||
URL(p)},M=this.connectionManager.lease(x,{requestTimeout:(a=this.config)==null?void
|
||||
0:a.sessionTimeout,disableConcurrentStreams:i||!1}),D=C(g=>{i&&this.destroySession(M),l=!0,u(g)},"rejectWithDestroy"),j=(0,qt.buildQueryString)(w||{}),B=e.path;j&&(B+=`?${j}`),e.fragment&&(B+=`#${e.fragment}`);let
|
||||
E=M.request({...e.headers,[jt.constants.HTTP2_HEADER_PATH]:B,[jt.constants.HTTP2_HEADER_METHOD]:y});if(M.ref(),E.on("response",g=>{let
|
||||
A=new
|
||||
Ft.HttpResponse({statusCode:g[":status"]||-1,headers:Zt(g),body:E});l=!0,f({response:A}),i&&(M.close(),this.connectionManager.deleteSession(p,M))}),n&&E.setTimeout(n,()=>{E.close();let
|
||||
g=new Error(`Stream timed out because of no activity for ${n}
|
||||
ms`);g.name="TimeoutError",D(g)}),r){let g=C(()=>{E.close();let A=new
|
||||
Error("Request
|
||||
aborted");A.name="AbortError",D(A)},"onAbort");if(typeof
|
||||
r.addEventListener=="function"){let
|
||||
A=r;A.addEventListener("abort",g,{once:!0}),E.once("close",()=>A.removeEventListener("abort",g))}else
|
||||
r.onabort=g}E.on("frameError",(g,A,P)=>{D(new Error(`Frame type id
|
||||
${g} in stream id ${P} has failed with code
|
||||
${A}.`))}),E.on("error",D),E.on("aborted",()=>{D(new Error(`HTTP/2
|
||||
stream is abnormally aborted in mid-communication with result code
|
||||
${E.rstCode}.`))}),E.on("close",()=>{M.unref(),i&&M.destroy(),l||D(new
|
||||
Error("Unexpected error: http2 request did not get a
|
||||
response"))}),h=_e(E,e,n)})}updateHttpClientConfig(e,r){this.config=void
|
||||
0,this.configProvider=this.configProvider.then(n=>({...n,[e]:r}))}httpHandlerConfigs(){return
|
||||
this.config??{}}destroySession(e){e.destroyed||e.destroy()}};C(Qt,"NodeHttp2Handler");var
|
||||
Yn=Qt,Xt=class extends
|
||||
Gt.Writable{constructor(){super(...arguments),this.bufferedBytes=[]}_write(e,r,n){this.bufferedBytes.push(e),n()}};C(Xt,"Collector");var
|
||||
Xn=Xt,ei=C(t=>ti(t)?er(t):new Promise((e,r)=>{let n=new
|
||||
Xn;t.pipe(n),t.on("error",i=>{n.end(),r(i)}),n.on("error",r),n.on("finish",function(){let
|
||||
i=new
|
||||
Uint8Array(Buffer.concat(this.bufferedBytes));e(i)})}),"streamCollector"),ti=C(t=>typeof
|
||||
ReadableStream=="function"&&t instanceof
|
||||
ReadableStream,"isReadableStreamInstance");async function er(t){let
|
||||
e=[],r=t.getReader(),n=!1,i=0;for(;!n;){let{done:a,value:l}=await
|
||||
r.read();l&&(e.push(l),i+=l.length),n=a}let o=new
|
||||
Uint8Array(i),s=0;for(let a of e)o.set(a,s),s+=a.length;return
|
||||
o}C(er,"collectReadableStream")});var
|
||||
oi={};mr(oi,{handler:()=>ii,handlerRaw:()=>sr});module.exports=yr(oi);var
|
||||
$e=require("module"),wr=(0,$e.createRequire)("/"),xr;try{xr=wr("worker_threads").Worker}catch{}var
|
||||
S=Uint8Array,q=Uint16Array,Cr=Int32Array,Fe=new
|
||||
S([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),qe=new
|
||||
S([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Tr=new
|
||||
S([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ze=function(t,e){for(var
|
||||
r=new q(31),n=0;n<31;++n)r[n]=e+=1<<t[n-1];for(var i=new
|
||||
Cr(r[30]),n=1;n<30;++n)for(var
|
||||
o=r[n];o<r[n+1];++o)i[o]=o-r[n]<<5|n;return{b:r,r:i}},Ge=Ze(Fe,2),Ke=Ge.b,br=Ge.r;Ke[28]=258,br[258]=28;var
|
||||
We=Ze(qe,0),Er=We.b,ai=We.r,de=new
|
||||
q(32768);for(v=0;v<32768;++v)k=(v&43690)>>1|(v&21845)<<1,k=(k&52428)>>2|(k&13107)<<2,k=(k&61680)>>4|(k&3855)<<4,de[v]=((k&65280)>>8|(k&255)<<8)>>1;var
|
||||
k,v,W=function(t,e,r){for(var n=t.length,i=0,o=new
|
||||
q(e);i<n;++i)t[i]&&++o[t[i]-1];var s=new
|
||||
q(e);for(i=1;i<e;++i)s[i]=s[i-1]+o[i-1]<<1;var a;if(r){a=new
|
||||
q(1<<e);var l=15-e;for(i=0;i<n;++i)if(t[i])for(var
|
||||
h=i<<4|t[i],f=e-t[i],u=s[t[i]-1]++<<f,c=u|(1<<f)-1;u<=c;++u)a[de[u]>>l]=h}else
|
||||
for(a=new
|
||||
q(n),i=0;i<n;++i)t[i]&&(a[i]=de[s[t[i]-1]++]>>15-t[i]);return a},V=new
|
||||
S(288);for(v=0;v<144;++v)V[v]=8;var v;for(v=144;v<256;++v)V[v]=9;var
|
||||
v;for(v=256;v<280;++v)V[v]=7;var v;for(v=280;v<288;++v)V[v]=8;var
|
||||
v,Ve=new S(32);for(v=0;v<32;++v)Ve[v]=5;var v;var Ar=W(V,9,1);var
|
||||
Pr=W(Ve,5,1),pe=function(t){for(var
|
||||
e=t[0],r=1;r<t.length;++r)t[r]>e&&(e=t[r]);return
|
||||
e},R=function(t,e,r){var
|
||||
n=e/8|0;return(t[n]|t[n+1]<<8)>>(e&7)&r},ge=function(t,e){var
|
||||
r=e/8|0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>(e&7)},Hr=function(t){return(t+7)/8|0},_r=function(t,e,r){return(e==null||e<0)&&(e=0),(r==null||r>t.length)&&(r=t.length),new
|
||||
S(t.subarray(e,r))};var Sr=["unexpected EOF","invalid block
|
||||
type","invalid length/literal","invalid distance","stream
|
||||
finished","no stream handler",,"no callback","invalid UTF-8
|
||||
data","extra field too long","date not in range 1980-2099","filename
|
||||
too long","stream finishing","invalid zip data"],_=function(t,e,r){var
|
||||
n=new
|
||||
Error(e||Sr[t]);if(n.code=t,Error.captureStackTrace&&Error.captureStackTrace(n,_),!r)throw
|
||||
n;return n},me=function(t,e,r,n){var
|
||||
i=t.length,o=n?n.length:0;if(!i||e.f&&!e.l)return r||new S(0);var
|
||||
s=!r,a=s||e.i!=2,l=e.i;s&&(r=new S(i*3));var h=function(ke){var
|
||||
Ie=r.length;if(ke>Ie){var Ne=new
|
||||
S(Math.max(Ie*2,ke));Ne.set(r),r=Ne}},f=e.f||0,u=e.p||0,c=e.b||0,y=e.l,T=e.d,m=e.m,w=e.n,H=i*8;do{if(!y){f=R(t,u,1);var
|
||||
p=R(t,u+1,3);if(u+=3,p)if(p==1)y=Ar,T=Pr,m=9,w=5;else if(p==2){var
|
||||
j=R(t,u,31)+257,B=R(t,u+10,15)+4,E=j+R(t,u+5,31)+1;u+=14;for(var g=new
|
||||
S(E),A=new S(19),P=0;P<B;++P)A[Tr[P]]=R(t,u+P*3,7);u+=B*3;for(var
|
||||
Oe=pe(A),ar=(1<<Oe)-1,lr=W(A,Oe,1),P=0;P<E;){var
|
||||
Me=lr[R(t,u,ar)];u+=Me&15;var x=Me>>4;if(x<16)g[P++]=x;else{var
|
||||
$=0,te=0;for(x==16?(te=3+R(t,u,3),u+=2,$=g[P-1]):x==17?(te=3+R(t,u,7),u+=3):x==18&&(te=11+R(t,u,127),u+=7);te--;)g[P++]=$}}var
|
||||
Re=g.subarray(0,j),I=g.subarray(j);m=pe(Re),w=pe(I),y=W(Re,m,1),T=W(I,w,1)}else
|
||||
_(1);else{var
|
||||
x=Hr(u)+4,M=t[x-4]|t[x-3]<<8,D=x+M;if(D>i){l&&_(0);break}a&&h(c+M),r.set(t.subarray(x,D),c),e.b=c+=M,e.p=u=D*8,e.f=f;continue}if(u>H){l&&_(0);break}}a&&h(c+131072);for(var
|
||||
ur=(1<<m)-1,cr=(1<<w)-1,he=u;;he=u){var
|
||||
$=y[ge(t,u)&ur],F=$>>4;if(u+=$&15,u>H){l&&_(0);break}if($||_(2),F<256)r[c++]=F;else
|
||||
if(F==256){he=u,y=null;break}else{var Ue=F-254;if(F>264){var
|
||||
P=F-257,G=Fe[P];Ue=R(t,u,(1<<G)-1)+Ke[P],u+=G}var
|
||||
fe=T[ge(t,u)&cr],ve=fe>>4;fe||_(3),u+=fe&15;var I=Er[ve];if(ve>3){var
|
||||
G=qe[ve];I+=ge(t,u)&(1<<G)-1,u+=G}if(u>H){l&&_(0);break}a&&h(c+131072);var
|
||||
De=c+Ue;if(c<I){var
|
||||
Le=o-I,hr=Math.min(I,De);for(Le+c<0&&_(3);c<hr;++c)r[c]=n[Le+c]}for(;c<De;++c)r[c]=r[c-I]}}e.l=y,e.p=he,e.b=c,e.f=f,y&&(f=1,e.m=m,e.d=T,e.n=w)}while(!f);return
|
||||
c!=r.length&&s?_r(r,0,c):r.subarray(0,c)};var zr=new S(0);var
|
||||
Or=function(t){(t[0]!=31||t[1]!=139||t[2]!=8)&&_(6,"invalid gzip
|
||||
data");var e=t[3],r=10;e&4&&(r+=(t[10]|t[11]<<8)+2);for(var
|
||||
n=(e>>3&1)+(e>>4&1);n>0;n-=!t[r++]);return r+(e&2)},Mr=function(t){var
|
||||
e=t.length;return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0};var
|
||||
Rr=function(t,e){return((t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31)&&_(6,"invalid
|
||||
zlib data"),(t[1]>>5&1)==+!e&&_(6,"invalid zlib data:
|
||||
"+(t[1]&32?"need":"unexpected")+" dictionary"),(t[1]>>3&4)+2};function
|
||||
Ur(t,e){return me(t,{i:2},e&&e.out,e&&e.dictionary)}function
|
||||
Dr(t,e){var r=Or(t);return r+8>t.length&&_(6,"invalid gzip
|
||||
data"),me(t.subarray(r,-8),{i:2},e&&e.out||new
|
||||
S(Mr(t)),e&&e.dictionary)}function Lr(t,e){return
|
||||
me(t.subarray(Rr(t,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}function
|
||||
Je(t,e){return
|
||||
t[0]==31&&t[1]==139&&t[2]==8?Dr(t,e):(t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31?Ur(t,e):Lr(t,e)}var
|
||||
kr=typeof TextDecoder<"u"&&new
|
||||
TextDecoder,Ir=0;try{kr.decode(zr,{stream:!0}),Ir=1}catch{}var
|
||||
Nr=Object.defineProperty,J=Math.pow,d=(t,e)=>Nr(t,"name",{value:e,configurable:!0}),b=(t,e,r)=>new
|
||||
Promise((n,i)=>{var
|
||||
o=l=>{try{a(r.next(l))}catch(h){i(h)}},s=l=>{try{a(r.throw(l))}catch(h){i(h)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(o,s);a((r=r.apply(t,e)).next())}),ci=d((t,e)=>{let
|
||||
r=!1,n="",i=L.GridLayer.extend({createTile:d((o,s)=>{let
|
||||
a=document.createElement("img"),l=new
|
||||
AbortController,h=l.signal;return
|
||||
a.cancel=()=>{l.abort()},r||(t.getHeader().then(f=>{f.tileType===1?console.error("Error:
|
||||
archive contains MVT vector tiles, but leafletRasterLayer is for
|
||||
displaying raster tiles. See
|
||||
https://github.com/protomaps/PMTiles/tree/main/js for
|
||||
details."):f.tileType===2?n="image/png":f.tileType===3?n="image/jpeg":f.tileType===4?n="image/webp":f.tileType===5&&(n="image/avif")}),r=!0),t.getZxy(o.z,o.x,o.y,h).then(f=>{if(f){let
|
||||
u=new
|
||||
Blob([f.data],{type:n}),c=window.URL.createObjectURL(u);a.src=c,a.cancel=void
|
||||
0,s(void 0,a)}}).catch(f=>{if(f.name!=="AbortError")throw
|
||||
f}),a},"createTile"),_removeTile:d(function(o){let
|
||||
s=this._tiles[o];s&&(s.el.cancel&&s.el.cancel(),s.el.width=0,s.el.height=0,s.el.deleted=!0,L.DomUtil.remove(s.el),delete
|
||||
this._tiles[o],this.fire("tileunload",{tile:s.el,coords:this._keyToTileCoords(o)}))},"_removeTile")});return
|
||||
new i(e)},"leafletRasterLayer"),jr=d(t=>(e,r)=>{if(r instanceof
|
||||
AbortController)return t(e,r);let n=new AbortController;return
|
||||
t(e,n).then(i=>r(void
|
||||
0,i.data,i.cacheControl||"",i.expires||""),i=>r(i)).catch(i=>r(i)),{cancel:d(()=>n.abort(),"cancel")}},"v3compat"),Br=class{constructor(e){this.tilev4=d((r,n)=>b(this,null,function*(){if(r.type==="json"){let
|
||||
y=r.url.substr(10),T=this.tiles.get(y);if(T||(T=new
|
||||
ne(y),this.tiles.set(y,T)),this.metadata)return{data:yield
|
||||
T.getTileJson(r.url)};let m=yield
|
||||
T.getHeader();return(m.minLon>=m.maxLon||m.minLat>=m.maxLat)&&console.error(`Bounds
|
||||
of PMTiles archive ${m.minLon},${m.minLat},${m.maxLon},${m.maxLat} are
|
||||
not
|
||||
valid.`),{data:{tiles:[`${r.url}/{z}/{x}/{y}`],minzoom:m.minZoom,maxzoom:m.maxZoom,bounds:[m.minLon,m.minLat,m.maxLon,m.maxLat]}}}let
|
||||
i=new
|
||||
RegExp(/pmtiles:\/\/(.+)\/(\d+)\/(\d+)\/(\d+)/),o=r.url.match(i);if(!o)throw
|
||||
new Error("Invalid PMTiles protocol URL");let
|
||||
s=o[1],a=this.tiles.get(s);a||(a=new ne(s),this.tiles.set(s,a));let
|
||||
l=o[2],h=o[3],f=o[4],u=yield a.getHeader(),c=yield
|
||||
a?.getZxy(+l,+h,+f,n.signal);if(c)return{data:new
|
||||
Uint8Array(c.data),cacheControl:c.cacheControl,expires:c.expires};if(u.tileType===1){if(this.errorOnMissingTile)throw
|
||||
new Error("Tile not found.");return{data:new
|
||||
Uint8Array}}return{data:null}}),"tilev4"),this.tile=jr(this.tilev4),this.tiles=new
|
||||
Map,this.metadata=e?.metadata||!1,this.errorOnMissingTile=e?.errorOnMissingTile||!1}add(e){this.tiles.set(e.source.getKey(),e)}get(e){return
|
||||
this.tiles.get(e)}};d(Br,"Protocol");function
|
||||
Qe(t,e){return(e>>>0)*4294967296+(t>>>0)}d(Qe,"toNum");function
|
||||
Ye(t,e){let
|
||||
r=e.buf,n=r[e.pos++],i=(n&112)>>4;if(n<128||(n=r[e.pos++],i|=(n&127)<<3,n<128)||(n=r[e.pos++],i|=(n&127)<<10,n<128)||(n=r[e.pos++],i|=(n&127)<<17,n<128)||(n=r[e.pos++],i|=(n&127)<<24,n<128)||(n=r[e.pos++],i|=(n&1)<<31,n<128))return
|
||||
Qe(t,i);throw new Error("Expected varint not more than 10
|
||||
bytes")}d(Ye,"readVarintRemainder");function Z(t){let
|
||||
e=t.buf,r=e[t.pos++],n=r&127;return
|
||||
r<128||(r=e[t.pos++],n|=(r&127)<<7,r<128)||(r=e[t.pos++],n|=(r&127)<<14,r<128)||(r=e[t.pos++],n|=(r&127)<<21,r<128)?n:(r=e[t.pos],n|=(r&15)<<28,Ye(n,t))}d(Z,"readVarint");function
|
||||
ye(t,e,r,n){if(n===0){r===1&&(e[0]=t-1-e[0],e[1]=t-1-e[1]);let
|
||||
i=e[0];e[0]=e[1],e[1]=i}}d(ye,"rotate");function Xe(t,e){let
|
||||
r=J(2,t),n=e,i=e,o=e,s=[0,0],a=1;for(;a<r;)n=1&o/2,i=1&(o^n),ye(a,s,n,i),s[0]+=a*n,s[1]+=a*i,o=o/4,a*=2;return[t,s[0],s[1]]}d(Xe,"idOnLevel");var
|
||||
$r=[0,1,5,21,85,341,1365,5461,21845,87381,349525,1398101,5592405,22369621,89478485,357913941,1431655765,5726623061,22906492245,91625968981,366503875925,1466015503701,5864062014805,23456248059221,93824992236885,375299968947541,0x5555555555555];function
|
||||
et(t,e,r){if(t>26)throw new Error("Tile zoom level exceeds max safe
|
||||
number limit (26)");if(e>J(2,t)-1||r>J(2,t)-1)throw new Error("tile
|
||||
x/y outside zoom level bounds");let
|
||||
n=$r[t],i=J(2,t),o=0,s=0,a=0,l=[e,r],h=i/2;for(;h>0;)o=(l[0]&h)>0?1:0,s=(l[1]&h)>0?1:0,a+=h*h*(3*o^s),ye(h,l,o,s),h=h/2;return
|
||||
n+a}d(et,"zxyToTileId");function Fr(t){let e=0,r=0;for(let
|
||||
n=0;n<27;n++){let i=(1<<n)*(1<<n);if(e+i>t)return Xe(n,t-e);e+=i}throw
|
||||
new Error("Tile zoom level exceeds max safe number limit
|
||||
(26)")}d(Fr,"tileIdToZxy");var
|
||||
Y=(t=>(t[t.Unknown=0]="Unknown",t[t.None=1]="None",t[t.Gzip=2]="Gzip",t[t.Brotli=3]="Brotli",t[t.Zstd=4]="Zstd",t))(Y||{});function
|
||||
ie(t,e){return b(this,null,function*(){if(e===1||e===0)return
|
||||
t;if(e===2){if(typeof globalThis.DecompressionStream>"u")return Je(new
|
||||
Uint8Array(t));let r=new Response(t).body;if(!r)throw new
|
||||
Error("Failed to read response stream");let n=r.pipeThrough(new
|
||||
globalThis.DecompressionStream("gzip"));return new
|
||||
Response(n).arrayBuffer()}throw new Error("Compression method not
|
||||
supported")})}d(ie,"defaultDecompress");var
|
||||
z=(t=>(t[t.Unknown=0]="Unknown",t[t.Mvt=1]="Mvt",t[t.Png=2]="Png",t[t.Jpeg=3]="Jpeg",t[t.Webp=4]="Webp",t[t.Avif=5]="Avif",t))(z||{});function
|
||||
X(t){return
|
||||
t===1?".mvt":t===2?".png":t===3?".jpg":t===4?".webp":t===5?".avif":""}d(X,"tileTypeExt");var
|
||||
qr=127;function tt(t,e){let r=0,n=t.length-1;for(;r<=n;){let
|
||||
i=n+r>>1,o=e-t[i].tileId;if(o>0)r=i+1;else if(o<0)n=i-1;else return
|
||||
t[i]}return
|
||||
n>=0&&(t[n].runLength===0||e-t[n].tileId<t[n].runLength)?t[n]:null}d(tt,"findTile");var
|
||||
Zr=class{constructor(e){this.file=e}getKey(){return
|
||||
this.file.name}getBytes(e,r){return
|
||||
b(this,null,function*(){return{data:yield
|
||||
this.file.slice(e,e+r).arrayBuffer()}})}};d(Zr,"FileSource");var
|
||||
rt=class{constructor(e,r=new
|
||||
Headers){this.url=e,this.customHeaders=r,this.mustReload=!1;let
|
||||
n="";"navigator"in
|
||||
globalThis&&(n=globalThis.navigator.userAgent||"");let
|
||||
i=n.indexOf("Windows")>-1,o=/Chrome|Chromium|Edg|OPR|Brave/.test(n);this.chromeWindowsNoCache=!1,i&&o&&(this.chromeWindowsNoCache=!0)}getKey(){return
|
||||
this.url}setHeaders(e){this.customHeaders=e}getBytes(e,r,n,i){return
|
||||
b(this,null,function*(){let o,s;n?s=n:(o=new
|
||||
AbortController,s=o.signal);let a=new
|
||||
Headers(this.customHeaders);a.set("range",`bytes=${e}-${e+r-1}`);let
|
||||
l;this.mustReload?l="reload":this.chromeWindowsNoCache&&(l="no-store");let
|
||||
h=yield
|
||||
fetch(this.url,{signal:s,cache:l,headers:a});if(e===0&&h.status===416){let
|
||||
c=h.headers.get("Content-Range");if(!c||!c.startsWith("bytes
|
||||
*/"))throw new Error("Missing content-length on 416 response");let
|
||||
y=+c.substr(8);h=yield
|
||||
fetch(this.url,{signal:s,cache:"reload",headers:{range:`bytes=0-${y-1}`}})}let
|
||||
f=h.headers.get("Etag");if(f!=null&&f.startsWith("W/")&&(f=null),h.status===416||i&&f&&f!==i)throw
|
||||
this.mustReload=!0,new Q(`Server returned non-matching ETag ${i} after
|
||||
one retry. Check browser extensions and servers for issues that may
|
||||
affect correct ETag headers.`);if(h.status>=300)throw new Error(`Bad
|
||||
response code: ${h.status}`);let
|
||||
u=h.headers.get("Content-Length");if(h.status===200&&(!u||+u>r))throw
|
||||
o&&o.abort(),new Error("Server returned no content-length header or
|
||||
content-length exceeding request. Check that your storage backend
|
||||
supports HTTP Byte Serving.");return{data:yield
|
||||
h.arrayBuffer(),etag:f||void
|
||||
0,cacheControl:h.headers.get("Cache-Control")||void
|
||||
0,expires:h.headers.get("Expires")||void
|
||||
0}})}};d(rt,"FetchSource");var Gr=rt;function O(t,e){let
|
||||
r=t.getUint32(e+4,!0),n=t.getUint32(e+0,!0);return
|
||||
r*J(2,32)+n}d(O,"getUint64");function nt(t,e){let r=new
|
||||
DataView(t),n=r.getUint8(7);if(n>3)throw new Error(`Archive is spec
|
||||
version ${n} but this library supports up to spec version
|
||||
3`);return{specVersion:n,rootDirectoryOffset:O(r,8),rootDirectoryLength:O(r,16),jsonMetadataOffset:O(r,24),jsonMetadataLength:O(r,32),leafDirectoryOffset:O(r,40),leafDirectoryLength:O(r,48),tileDataOffset:O(r,56),tileDataLength:O(r,64),numAddressedTiles:O(r,72),numTileEntries:O(r,80),numTileContents:O(r,88),clustered:r.getUint8(96)===1,internalCompression:r.getUint8(97),tileCompression:r.getUint8(98),tileType:r.getUint8(99),minZoom:r.getUint8(100),maxZoom:r.getUint8(101),minLon:r.getInt32(102,!0)/1e7,minLat:r.getInt32(106,!0)/1e7,maxLon:r.getInt32(110,!0)/1e7,maxLat:r.getInt32(114,!0)/1e7,centerZoom:r.getUint8(118),centerLon:r.getInt32(119,!0)/1e7,centerLat:r.getInt32(123,!0)/1e7,etag:e}}d(nt,"bytesToHeader");function
|
||||
we(t){let e={buf:new Uint8Array(t),pos:0},r=Z(e),n=[],i=0;for(let
|
||||
o=0;o<r;o++){let
|
||||
s=Z(e);n.push({tileId:i+s,offset:0,length:0,runLength:1}),i+=s}for(let
|
||||
o=0;o<r;o++)n[o].runLength=Z(e);for(let
|
||||
o=0;o<r;o++)n[o].length=Z(e);for(let o=0;o<r;o++){let
|
||||
s=Z(e);s===0&&o>0?n[o].offset=n[o-1].offset+n[o-1].length:n[o].offset=s-1}return
|
||||
n}d(we,"deserializeIndex");var it=class extends
|
||||
Error{};d(it,"EtagMismatch");var Q=it;function xe(t,e){return
|
||||
b(this,null,function*(){let r=yield t.getBytes(0,16384);if(new
|
||||
DataView(r.data).getUint16(0,!0)!==19792)throw new Error("Wrong magic
|
||||
number for PMTiles archive");let
|
||||
n=r.data.slice(0,qr),i=nt(n,r.etag),o=r.data.slice(i.rootDirectoryOffset,i.rootDirectoryOffset+i.rootDirectoryLength),s=`${t.getKey()}|${i.etag||""}|${i.rootDirectoryOffset}|${i.rootDirectoryLength}`,a=we(yield
|
||||
e(o,i.internalCompression));return[i,[s,a.length,a]]})}d(xe,"getHeaderAndRoot");function
|
||||
Ce(t,e,r,n,i){return b(this,null,function*(){let o=yield
|
||||
t.getBytes(r,n,void 0,i.etag),s=yield
|
||||
e(o.data,i.internalCompression),a=we(s);if(a.length===0)throw new
|
||||
Error("Empty directory is invalid");return
|
||||
a})}d(Ce,"getDirectory");var
|
||||
ot=class{constructor(e=100,r=!0,n=ie){this.cache=new
|
||||
Map,this.maxCacheEntries=e,this.counter=1,this.decompress=n}getHeader(e){return
|
||||
b(this,null,function*(){let
|
||||
r=e.getKey(),n=this.cache.get(r);if(n)return
|
||||
n.lastUsed=this.counter++,n.data;let i=yield
|
||||
xe(e,this.decompress);return
|
||||
i[1]&&this.cache.set(i[1][0],{lastUsed:this.counter++,data:i[1][2]}),this.cache.set(r,{lastUsed:this.counter++,data:i[0]}),this.prune(),i[0]})}getDirectory(e,r,n,i){return
|
||||
b(this,null,function*(){let
|
||||
o=`${e.getKey()}|${i.etag||""}|${r}|${n}`,s=this.cache.get(o);if(s)return
|
||||
s.lastUsed=this.counter++,s.data;let a=yield
|
||||
Ce(e,this.decompress,r,n,i);return
|
||||
this.cache.set(o,{lastUsed:this.counter++,data:a}),this.prune(),a})}prune(){if(this.cache.size>this.maxCacheEntries){let
|
||||
e=1/0,r;this.cache.forEach((n,i)=>{n.lastUsed<e&&(e=n.lastUsed,r=i)}),r&&this.cache.delete(r)}}invalidate(e){return
|
||||
b(this,null,function*(){this.cache.delete(e.getKey())})}};d(ot,"ResolvedValueCache");var
|
||||
st=ot,at=class{constructor(e=100,r=!0,n=ie){this.cache=new
|
||||
Map,this.invalidations=new
|
||||
Map,this.maxCacheEntries=e,this.counter=1,this.decompress=n}getHeader(e){return
|
||||
b(this,null,function*(){let
|
||||
r=e.getKey(),n=this.cache.get(r);if(n)return
|
||||
n.lastUsed=this.counter++,yield n.data;let i=new
|
||||
Promise((o,s)=>{xe(e,this.decompress).then(a=>{a[1]&&this.cache.set(a[1][0],{lastUsed:this.counter++,data:Promise.resolve(a[1][2])}),o(a[0]),this.prune()}).catch(a=>{s(a)})});return
|
||||
this.cache.set(r,{lastUsed:this.counter++,data:i}),i})}getDirectory(e,r,n,i){return
|
||||
b(this,null,function*(){let
|
||||
o=`${e.getKey()}|${i.etag||""}|${r}|${n}`,s=this.cache.get(o);if(s)return
|
||||
s.lastUsed=this.counter++,yield s.data;let a=new
|
||||
Promise((l,h)=>{Ce(e,this.decompress,r,n,i).then(f=>{l(f),this.prune()}).catch(f=>{h(f)})});return
|
||||
this.cache.set(o,{lastUsed:this.counter++,data:a}),a})}prune(){if(this.cache.size>=this.maxCacheEntries){let
|
||||
e=1/0,r;this.cache.forEach((n,i)=>{n.lastUsed<e&&(e=n.lastUsed,r=i)}),r&&this.cache.delete(r)}}invalidate(e){return
|
||||
b(this,null,function*(){let
|
||||
r=e.getKey();if(this.invalidations.get(r))return yield
|
||||
this.invalidations.get(r);this.cache.delete(e.getKey());let n=new
|
||||
Promise((i,o)=>{this.getHeader(e).then(s=>{i(),this.invalidations.delete(r)}).catch(s=>{o(s)})});this.invalidations.set(r,n)})}};d(at,"SharedPromiseCache");var
|
||||
Kr=at,lt=class{constructor(e,r,n){typeof e=="string"?this.source=new
|
||||
Gr(e):this.source=e,n?this.decompress=n:this.decompress=ie,r?this.cache=r:this.cache=new
|
||||
Kr}getHeader(){return b(this,null,function*(){return yield
|
||||
this.cache.getHeader(this.source)})}getZxyAttempt(e,r,n,i){return
|
||||
b(this,null,function*(){let o=et(e,r,n),s=yield
|
||||
this.cache.getHeader(this.source);if(e<s.minZoom||e>s.maxZoom)return;let
|
||||
a=s.rootDirectoryOffset,l=s.rootDirectoryLength;for(let
|
||||
h=0;h<=3;h++){let f=yield
|
||||
this.cache.getDirectory(this.source,a,l,s),u=tt(f,o);if(u){if(u.runLength>0){let
|
||||
c=yield
|
||||
this.source.getBytes(s.tileDataOffset+u.offset,u.length,i,s.etag);return{data:yield
|
||||
this.decompress(c.data,s.tileCompression),cacheControl:c.cacheControl,expires:c.expires}}a=s.leafDirectoryOffset+u.offset,l=u.length}else
|
||||
return}throw new Error("Maximum directory depth
|
||||
exceeded")})}getZxy(e,r,n,i){return b(this,null,function*(){try{return
|
||||
yield this.getZxyAttempt(e,r,n,i)}catch(o){if(o instanceof Q)return
|
||||
this.cache.invalidate(this.source),yield
|
||||
this.getZxyAttempt(e,r,n,i);throw o}})}getMetadataAttempt(){return
|
||||
b(this,null,function*(){let e=yield
|
||||
this.cache.getHeader(this.source),r=yield
|
||||
this.source.getBytes(e.jsonMetadataOffset,e.jsonMetadataLength,void
|
||||
0,e.etag),n=yield this.decompress(r.data,e.internalCompression),i=new
|
||||
TextDecoder("utf-8");return
|
||||
JSON.parse(i.decode(n))})}getMetadata(){return
|
||||
b(this,null,function*(){try{return yield
|
||||
this.getMetadataAttempt()}catch(e){if(e instanceof Q)return
|
||||
this.cache.invalidate(this.source),yield
|
||||
this.getMetadataAttempt();throw e}})}getTileJson(e){return
|
||||
b(this,null,function*(){let r=yield this.getHeader(),n=yield
|
||||
this.getMetadata(),i=X(r.tileType);return{tilejson:"3.0.0",scheme:"xyz",tiles:[`${e}/{z}/{x}/{y}${i}`],vector_layers:n.vector_layers,attribution:n.attribution,description:n.description,name:n.name,version:n.version,bounds:[r.minLon,r.minLat,r.maxLon,r.maxLat],center:[r.centerLon,r.centerLat,r.centerZoom],minzoom:r.minZoom,maxzoom:r.maxZoom}})}};d(lt,"PMTiles");var
|
||||
ne=lt;var
|
||||
ut=(t,e)=>e?e.replaceAll("{name}",t):t+".pmtiles",Wr=/^\/(?<NAME>[0-9a-zA-Z\/!\-_\.\*\'\(\)]+)\/(?<Z>\d+)\/(?<X>\d+)\/(?<Y>\d+).(?<EXT>[a-z]+)$/,Vr=/^\/(?<NAME>[0-9a-zA-Z\/!\-_\.\*\'\(\)]+).json$/,ct=t=>{let
|
||||
e=t.match(Wr);if(e){let
|
||||
n=e.groups;return{ok:!0,name:n.NAME,tile:[+n.Z,+n.X,+n.Y],ext:n.EXT}}let
|
||||
r=t.match(Vr);return
|
||||
r?{ok:!0,name:r.groups.NAME,ext:"json"}:{ok:!1,name:"",tile:[0,0,0],ext:""}};var
|
||||
nr=require("crypto"),ze=Be(require("zlib")),ce=require("@aws-sdk/client-s3"),ir=Be(rr()),ri=new
|
||||
ce.S3Client({requestHandler:new
|
||||
ir.NodeHttpHandler({connectionTimeout:500,socketTimeout:500})});async
|
||||
function or(t,e){if(e===Y.None||e===Y.Unknown)return
|
||||
t;if(e===Y.Gzip)return ze.default.gunzipSync(t);throw new
|
||||
Error("Compression method not supported")}var ni=new st(void 0,void
|
||||
0,or),Se=class{constructor(e){this.archiveName=e}getKey(){return
|
||||
this.archiveName}async getBytes(e,r,n,i){let o;try{o=await ri.send(new
|
||||
ce.GetObjectCommand({Bucket:process.env.BUCKET,Key:ut(this.archiveName,process.env.PMTILES_PATH),Range:"bytes="+e+"-"+(e+r-1),IfMatch:i,RequestPayer:"requester"}))}catch(a){throw
|
||||
a instanceof Error&&a.name==="PreconditionFailed"?new Q:a}let s=await
|
||||
o.Body?.transformToByteArray();if(!s)throw new Error("Failed to read
|
||||
S3 response
|
||||
body");return{data:s.buffer,etag:o.ETag,expires:o.Expires?.toISOString(),cacheControl:o.CacheControl}}},U=(t,e,r=!1,n={})=>({statusCode:t,body:e,headers:n,isBase64Encoded:r}),sr=async(t,e,r)=>{let
|
||||
n,i=!1;if(t.pathParameters)if(i=!0,t.pathParameters.proxy)n=`/${t.pathParameters.proxy}`;else
|
||||
return U(500,"Proxy integration missing tile_path parameter");else
|
||||
n=t.rawPath;if(!n)return U(500,"Invalid event configuration");let
|
||||
o={};process.env.CORS&&(o["Access-Control-Allow-Origin"]=process.env.CORS);let{ok:s,name:a,tile:l,ext:h}=ct(n);if(!s)return
|
||||
U(400,"Invalid tile URL",!1,o);let f=new Se(a),u=new
|
||||
ne(f,ni,or);try{let c=await
|
||||
u.getHeader();if(!l){if(!(process.env.PUBLIC_HOSTNAME||t.headers["x-distribution-domain-name"]))return
|
||||
U(501,"PUBLIC_HOSTNAME must be set for
|
||||
TileJSON",!1,o);o["Content-Type"]="application/json";let w=await
|
||||
u.getTileJson(`https://${process.env.PUBLIC_HOSTNAME||t.headers["x-distribution-domain-name"]||""}/${a}`);return
|
||||
U(200,JSON.stringify(w),!1,o)}if(l[0]<c.minZoom||l[0]>c.maxZoom)return
|
||||
U(404,"",!1,o);let
|
||||
T={mvt:z.Mvt,pbf:z.Mvt,png:z.Png,jpg:z.Jpeg,webp:z.Webp,avif:z.Avif}[h];if(c.tileType!==T&&X(c.tileType)!=="")return
|
||||
U(400,`Bad request: requested .${h} but archive has type
|
||||
${X(c.tileType)}`,!1,o);let m=await
|
||||
u.getZxy(l[0],l[1],l[2]);if(m){switch(c.tileType){case
|
||||
z.Mvt:o["Content-Type"]="application/vnd.mapbox-vector-tile";break;case
|
||||
z.Png:o["Content-Type"]="image/png";break;case
|
||||
z.Jpeg:o["Content-Type"]="image/jpeg";break;case
|
||||
z.Webp:o["Content-Type"]="image/webp";break;case
|
||||
z.Avif:o["Content-Type"]="image/avif";break}let
|
||||
w=m.data;if(r&&(w=r(w,c.tileType)),o["Cache-Control"]=process.env.CACHE_CONTROL||"public,
|
||||
max-age=86400",o.ETag=`"${(0,nr.createHash)("sha256").update(Buffer.from(w)).digest("hex")}"`,i){let
|
||||
H=ze.default.gzipSync(w);return
|
||||
o["Content-Encoding"]="gzip",U(200,Buffer.from(H).toString("base64"),!0,o)}return
|
||||
U(200,Buffer.from(w).toString("base64"),!0,o)}return
|
||||
U(204,"",!1,o)}catch(c){if(c.name==="AccessDenied")return
|
||||
U(403,"Bucket access unauthorized",!1,o);throw
|
||||
c}},ii=async(t,e)=>await
|
||||
sr(t,e);0&&(module.exports={handler,handlerRaw});
|
||||
32
examples/leaflet.html
Normal file
32
examples/leaflet.html
Normal file
@@ -0,0 +1,32 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>PMTiles Leaflet Example</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.0/dist/leaflet.css" />
|
||||
<script src="https://unpkg.com/leaflet@1.9.0/dist/leaflet.js"></script>
|
||||
<script src="https://unpkg.com/pmtiles@4.4.0/dist/pmtiles.js"></script>
|
||||
<style>
|
||||
body, #map {
|
||||
height:100vh;
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="map"></div>
|
||||
<script type="text/javascript">
|
||||
const map = L.map("map");
|
||||
|
||||
const p = new pmtiles.PMTiles(
|
||||
"https://air.mtn.tw/flowers.pmtiles"
|
||||
);
|
||||
p.getHeader().then((h) => {
|
||||
let layer = pmtiles.leafletRasterLayer(p, {
|
||||
maxNativeZoom: h.maxZoom
|
||||
});
|
||||
map.fitBounds(L.latLngBounds([h.minLat, h.minLon],[h.maxLat, h.maxLon]));
|
||||
layer.addTo(map);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
85
examples/maplibre.html
Normal file
85
examples/maplibre.html
Normal file
@@ -0,0 +1,85 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>PMTiles MapLibre Example</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl@5.13.0/dist/maplibre-gl.css" crossorigin="anonymous">
|
||||
<script src="https://unpkg.com/maplibre-gl@5.13.0/dist/maplibre-gl.js" crossorigin="anonymous"></script>
|
||||
<script src="https://unpkg.com/pmtiles@4.4.0/dist/pmtiles.js"></script>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
#map {
|
||||
height:100%; width:100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="map"></div>
|
||||
<script type="text/javascript">
|
||||
// add the PMTiles plugin to the maplibregl global.
|
||||
// setting metadata = true fills out the "attribution" field of the source, and is required for some inspector applications,
|
||||
// but requires an additional blocking HTTP request before loading the map.
|
||||
let protocol = new pmtiles.Protocol({metadata: true});
|
||||
maplibregl.addProtocol("pmtiles", protocol.tile);
|
||||
|
||||
const map = new maplibregl.Map({
|
||||
container: "map",
|
||||
zoom: 13,
|
||||
center: [11.2543435, 43.7672134],
|
||||
style: {
|
||||
version: 8,
|
||||
sources: {
|
||||
example_source: {
|
||||
type: "vector",
|
||||
// For standard Z/X/Y tile APIs or Z/X/Y URLs served from go-pmtiles, replace "url" with "tiles" and remove all the pmtiles-related client code.
|
||||
// tiles: ["https://example.com/{z}/[x}/{y}.mvt"],
|
||||
// see https://maplibre.org/maplibre-style-spec/sources/#vector
|
||||
url: "pmtiles://https://pmtiles.io/protomaps(vector)ODbL_firenze.pmtiles",
|
||||
},
|
||||
},
|
||||
layers: [
|
||||
{
|
||||
id: "water",
|
||||
source: "example_source",
|
||||
"source-layer": "water",
|
||||
filter: ["==",["geometry-type"],"Polygon"],
|
||||
type: "fill",
|
||||
paint: {
|
||||
"fill-color": "#80b1d3",
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "buildings",
|
||||
source: "example_source",
|
||||
"source-layer": "buildings",
|
||||
type: "fill",
|
||||
paint: {
|
||||
"fill-color": "#d9d9d9",
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "roads",
|
||||
source: "example_source",
|
||||
"source-layer": "roads",
|
||||
type: "line",
|
||||
paint: {
|
||||
"line-color": "#fc8d62",
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "pois",
|
||||
source: "example_source",
|
||||
"source-layer": "pois",
|
||||
type: "circle",
|
||||
paint: {
|
||||
"circle-color": "#ffffb3",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
map.showTileBoundaries = true;
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
104
examples/maplibre_advanced.html
Normal file
104
examples/maplibre_advanced.html
Normal file
@@ -0,0 +1,104 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>PMTiles MapLibre Example</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl@5.13.0/dist/maplibre-gl.css" crossorigin="anonymous">
|
||||
<script src="https://unpkg.com/maplibre-gl@5.13.0/dist/maplibre-gl.js" crossorigin="anonymous"></script>
|
||||
<script src="https://unpkg.com/pmtiles@4.4.0/dist/pmtiles.js"></script>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
#map {
|
||||
height:calc(100% - 50px);
|
||||
width:100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="map"></div>
|
||||
Description from PMTiles metadata: <span id="description"></span>
|
||||
<script type="text/javascript">
|
||||
// Advanced MapLibre example demonstrating PMTiles JavaScript API + pmtiles:// protocol.
|
||||
|
||||
let protocol = new pmtiles.Protocol();
|
||||
maplibregl.addProtocol("pmtiles", protocol.tile);
|
||||
|
||||
let PMTILES_URL = "https://pmtiles.io/protomaps(vector)ODbL_firenze.pmtiles";
|
||||
|
||||
let source = new pmtiles.FetchSource(PMTILES_URL, new Headers({'Content-Language': 'xx'}));
|
||||
|
||||
const p = new pmtiles.PMTiles(source);
|
||||
|
||||
// this is so we share one instance across the JS code and the map renderer
|
||||
protocol.add(p);
|
||||
|
||||
p.getMetadata().then((m) => {
|
||||
document.getElementById("description").textContent = m.description;
|
||||
})
|
||||
|
||||
// we first fetch the header so we can get the center lon, lat of the map.
|
||||
p.getHeader().then((h) => {
|
||||
const map = new maplibregl.Map({
|
||||
container: "map",
|
||||
zoom: h.maxZoom - 2,
|
||||
center: [h.centerLon, h.centerLat],
|
||||
style: {
|
||||
version: 8,
|
||||
sources: {
|
||||
example_source: {
|
||||
type: "vector",
|
||||
// For standard Z/X/Y tile APIs or Z/X/Y URLs served from go-pmtiles, replace "url" with "tiles" and remove all the pmtiles-related client code.
|
||||
// tiles: ["https://example.com/{z}/[x}/{y}.mvt"],
|
||||
// see https://maplibre.org/maplibre-style-spec/sources/#vector
|
||||
url: "pmtiles://" + PMTILES_URL,
|
||||
attribution:
|
||||
'© <a href="https://openstreetmap.org">OpenStreetMap</a>',
|
||||
},
|
||||
},
|
||||
layers: [
|
||||
{
|
||||
id: "water",
|
||||
source: "example_source",
|
||||
"source-layer": "water",
|
||||
filter: ["==",["geometry-type"],"Polygon"],
|
||||
type: "fill",
|
||||
paint: {
|
||||
"fill-color": "#80b1d3",
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "buildings",
|
||||
source: "example_source",
|
||||
"source-layer": "buildings",
|
||||
type: "fill",
|
||||
paint: {
|
||||
"fill-color": "#d9d9d9",
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "roads",
|
||||
source: "example_source",
|
||||
"source-layer": "roads",
|
||||
type: "line",
|
||||
paint: {
|
||||
"line-color": "#fc8d62",
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "pois",
|
||||
source: "example_source",
|
||||
"source-layer": "pois",
|
||||
type: "circle",
|
||||
paint: {
|
||||
"circle-color": "#ffffb3",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
map.showTileBoundaries = true;
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
59
examples/maplibre_raster_dem.html
Normal file
59
examples/maplibre_raster_dem.html
Normal file
@@ -0,0 +1,59 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>PMTiles MapLibre Raster DEM Example</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl@5.13.0/dist/maplibre-gl.css" crossorigin="anonymous">
|
||||
<script src="https://unpkg.com/maplibre-gl@5.13.0/dist/maplibre-gl.js" crossorigin="anonymous"></script>
|
||||
<script src="https://unpkg.com/pmtiles@4.4.0/dist/pmtiles.js"></script>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
#map {
|
||||
height:100%; width:100%;
|
||||
}
|
||||
#overlay {
|
||||
position: absolute;
|
||||
top: 1rem;
|
||||
left: 1rem;
|
||||
font: 600 16px sans-serif;
|
||||
background-color: white;
|
||||
border-radius: 4px;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="map"></div>
|
||||
<div id="overlay">
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
let protocol = new pmtiles.Protocol({metadata: true});
|
||||
maplibregl.addProtocol("pmtiles", protocol.tile);
|
||||
|
||||
const map = new maplibregl.Map({
|
||||
container: "map",
|
||||
zoom: 0,
|
||||
center: [0, 0],
|
||||
style: {
|
||||
version: 8,
|
||||
sources: {
|
||||
example_source: {
|
||||
type: "raster-dem",
|
||||
url: "pmtiles://https://download.mapterhorn.com/planet.pmtiles",
|
||||
encoding: "terrarium",
|
||||
attribution: "<a href='https://mapterhorn.com/attribution'>© Mapterhorn</a>"
|
||||
},
|
||||
},
|
||||
layers: [
|
||||
{
|
||||
id: "dem",
|
||||
source: "example_source",
|
||||
type: "hillshade",
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
39
examples/openlayers/raster.html
Normal file
39
examples/openlayers/raster.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>PMTiles OpenLayers Raster Example</title>
|
||||
<meta charset="utf-8"/>
|
||||
<script src="https://cdn.jsdelivr.net/npm/ol@v9.0.0/dist/ol.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ol@v9.0.0/ol.css">
|
||||
<script src="https://unpkg.com/ol-pmtiles@2.0.2/dist/olpmtiles.js"></script>
|
||||
<style>
|
||||
body, #map {
|
||||
height:100vh;
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="map"></div>
|
||||
<script type="text/javascript">
|
||||
const rasterLayer = new ol.layer.WebGLTile({
|
||||
source: new olpmtiles.PMTilesRasterSource({
|
||||
url:"https://download.mapterhorn.com/planet.pmtiles",
|
||||
attributions:["https://mapterhorn.com/attribution/"],
|
||||
tileSize: [512,512]
|
||||
})
|
||||
});
|
||||
|
||||
ol.proj.useGeographic();
|
||||
|
||||
const map = new ol.Map({
|
||||
layers: [rasterLayer],
|
||||
target: 'map',
|
||||
view: new ol.View({
|
||||
center: [0,0],
|
||||
zoom: 1,
|
||||
multiWorld: true
|
||||
}),
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
46
examples/openlayers/vector.html
Normal file
46
examples/openlayers/vector.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>PMTiles OpenLayers Vector Example</title>
|
||||
<meta charset="utf-8"/>
|
||||
<script src="https://cdn.jsdelivr.net/npm/ol@v9.0.0/dist/ol.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ol@v9.0.0/ol.css">
|
||||
<script src="https://unpkg.com/ol-pmtiles@2.0.2/dist/olpmtiles.js"></script>
|
||||
<style>
|
||||
body, #map {
|
||||
height:100vh;
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="map"></div>
|
||||
<script type="text/javascript">
|
||||
const vectorLayer = new ol.layer.VectorTile({
|
||||
declutter: true,
|
||||
source: new olpmtiles.PMTilesVectorSource({
|
||||
url: "https://r2-public.protomaps.com/protomaps-sample-datasets/nz-buildings-v3.pmtiles",
|
||||
attributions: ["© Land Information New Zealand"]
|
||||
}),
|
||||
style: new ol.style.Style({
|
||||
stroke: new ol.style.Stroke({
|
||||
color: 'gray',
|
||||
width: 1,
|
||||
}),
|
||||
fill: new ol.style.Fill({
|
||||
color: 'rgba(20,20,20,0.9)',
|
||||
})
|
||||
})
|
||||
});
|
||||
|
||||
ol.proj.useGeographic();
|
||||
const map = new ol.Map({
|
||||
layers: [vectorLayer],
|
||||
target: 'map',
|
||||
view: new ol.View({
|
||||
center: [172.606201,-43.556510],
|
||||
zoom: 7
|
||||
}),
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
22
index.html
Normal file
22
index.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="theme-color" content="#3131DC"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>PMTiles viewer</title>
|
||||
<link rel="preconnect" href="https://api.protomaps.com"/>
|
||||
<link rel="preconnect" href="https://protomaps.github.io"/>
|
||||
<link rel="preconnect" href="https://unpkg.com"/>
|
||||
<link rel="preconnect" href="https://demo-bucket.protomaps.com"/>
|
||||
<script type="module" crossorigin src="/assets/map-CEKlbm8H.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/assets/Frame-_0hG118X.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/index-CAhF7OQY.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/LayersPanel-DHglLXEr.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/Frame-BpBOn-1w.css">
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-DwUhsmFz.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
||||
BIN
lambda_function.zip
Normal file
BIN
lambda_function.zip
Normal file
Binary file not shown.
BIN
protomaps(vector)ODbL_firenze.pmtiles
Normal file
BIN
protomaps(vector)ODbL_firenze.pmtiles
Normal file
Binary file not shown.
BIN
stamen_toner(raster)CC-BY+ODbL_z3.pmtiles
Normal file
BIN
stamen_toner(raster)CC-BY+ODbL_z3.pmtiles
Normal file
Binary file not shown.
20
tile/index.html
Normal file
20
tile/index.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="theme-color" content="#3131DC"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>PMTiles tile inspector</title>
|
||||
<link rel="preconnect" href="https://api.protomaps.com"/>
|
||||
<link rel="preconnect" href="https://protomaps.github.io"/>
|
||||
<link rel="preconnect" href="https://unpkg.com"/>
|
||||
<link rel="preconnect" href="https://demo-bucket.protomaps.com"/>
|
||||
<script type="module" crossorigin src="/assets/tile-BQ02WL-K.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/assets/Frame-_0hG118X.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/LayersPanel-DHglLXEr.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/Frame-BpBOn-1w.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
||||
1
typedoc/.nojekyll
Normal file
1
typedoc/.nojekyll
Normal file
@@ -0,0 +1 @@
|
||||
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
|
||||
120
typedoc/assets/highlight.css
Normal file
120
typedoc/assets/highlight.css
Normal file
@@ -0,0 +1,120 @@
|
||||
:root {
|
||||
--light-hl-0: #000000;
|
||||
--dark-hl-0: #D4D4D4;
|
||||
--light-hl-1: #800000;
|
||||
--dark-hl-1: #808080;
|
||||
--light-hl-2: #800000;
|
||||
--dark-hl-2: #569CD6;
|
||||
--light-hl-3: #000000FF;
|
||||
--dark-hl-3: #D4D4D4;
|
||||
--light-hl-4: #E50000;
|
||||
--dark-hl-4: #9CDCFE;
|
||||
--light-hl-5: #0000FF;
|
||||
--dark-hl-5: #CE9178;
|
||||
--light-hl-6: #AF00DB;
|
||||
--dark-hl-6: #C586C0;
|
||||
--light-hl-7: #001080;
|
||||
--dark-hl-7: #9CDCFE;
|
||||
--light-hl-8: #A31515;
|
||||
--dark-hl-8: #CE9178;
|
||||
--light-hl-9: #0000FF;
|
||||
--dark-hl-9: #569CD6;
|
||||
--light-hl-10: #0070C1;
|
||||
--dark-hl-10: #4FC1FF;
|
||||
--light-hl-11: #795E26;
|
||||
--dark-hl-11: #DCDCAA;
|
||||
--light-hl-12: #098658;
|
||||
--dark-hl-12: #B5CEA8;
|
||||
--light-hl-13: #008000;
|
||||
--dark-hl-13: #6A9955;
|
||||
--light-code-background: #FFFFFF;
|
||||
--dark-code-background: #1E1E1E;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) { :root {
|
||||
--hl-0: var(--light-hl-0);
|
||||
--hl-1: var(--light-hl-1);
|
||||
--hl-2: var(--light-hl-2);
|
||||
--hl-3: var(--light-hl-3);
|
||||
--hl-4: var(--light-hl-4);
|
||||
--hl-5: var(--light-hl-5);
|
||||
--hl-6: var(--light-hl-6);
|
||||
--hl-7: var(--light-hl-7);
|
||||
--hl-8: var(--light-hl-8);
|
||||
--hl-9: var(--light-hl-9);
|
||||
--hl-10: var(--light-hl-10);
|
||||
--hl-11: var(--light-hl-11);
|
||||
--hl-12: var(--light-hl-12);
|
||||
--hl-13: var(--light-hl-13);
|
||||
--code-background: var(--light-code-background);
|
||||
} }
|
||||
|
||||
@media (prefers-color-scheme: dark) { :root {
|
||||
--hl-0: var(--dark-hl-0);
|
||||
--hl-1: var(--dark-hl-1);
|
||||
--hl-2: var(--dark-hl-2);
|
||||
--hl-3: var(--dark-hl-3);
|
||||
--hl-4: var(--dark-hl-4);
|
||||
--hl-5: var(--dark-hl-5);
|
||||
--hl-6: var(--dark-hl-6);
|
||||
--hl-7: var(--dark-hl-7);
|
||||
--hl-8: var(--dark-hl-8);
|
||||
--hl-9: var(--dark-hl-9);
|
||||
--hl-10: var(--dark-hl-10);
|
||||
--hl-11: var(--dark-hl-11);
|
||||
--hl-12: var(--dark-hl-12);
|
||||
--hl-13: var(--dark-hl-13);
|
||||
--code-background: var(--dark-code-background);
|
||||
} }
|
||||
|
||||
:root[data-theme='light'] {
|
||||
--hl-0: var(--light-hl-0);
|
||||
--hl-1: var(--light-hl-1);
|
||||
--hl-2: var(--light-hl-2);
|
||||
--hl-3: var(--light-hl-3);
|
||||
--hl-4: var(--light-hl-4);
|
||||
--hl-5: var(--light-hl-5);
|
||||
--hl-6: var(--light-hl-6);
|
||||
--hl-7: var(--light-hl-7);
|
||||
--hl-8: var(--light-hl-8);
|
||||
--hl-9: var(--light-hl-9);
|
||||
--hl-10: var(--light-hl-10);
|
||||
--hl-11: var(--light-hl-11);
|
||||
--hl-12: var(--light-hl-12);
|
||||
--hl-13: var(--light-hl-13);
|
||||
--code-background: var(--light-code-background);
|
||||
}
|
||||
|
||||
:root[data-theme='dark'] {
|
||||
--hl-0: var(--dark-hl-0);
|
||||
--hl-1: var(--dark-hl-1);
|
||||
--hl-2: var(--dark-hl-2);
|
||||
--hl-3: var(--dark-hl-3);
|
||||
--hl-4: var(--dark-hl-4);
|
||||
--hl-5: var(--dark-hl-5);
|
||||
--hl-6: var(--dark-hl-6);
|
||||
--hl-7: var(--dark-hl-7);
|
||||
--hl-8: var(--dark-hl-8);
|
||||
--hl-9: var(--dark-hl-9);
|
||||
--hl-10: var(--dark-hl-10);
|
||||
--hl-11: var(--dark-hl-11);
|
||||
--hl-12: var(--dark-hl-12);
|
||||
--hl-13: var(--dark-hl-13);
|
||||
--code-background: var(--dark-code-background);
|
||||
}
|
||||
|
||||
.hl-0 { color: var(--hl-0); }
|
||||
.hl-1 { color: var(--hl-1); }
|
||||
.hl-2 { color: var(--hl-2); }
|
||||
.hl-3 { color: var(--hl-3); }
|
||||
.hl-4 { color: var(--hl-4); }
|
||||
.hl-5 { color: var(--hl-5); }
|
||||
.hl-6 { color: var(--hl-6); }
|
||||
.hl-7 { color: var(--hl-7); }
|
||||
.hl-8 { color: var(--hl-8); }
|
||||
.hl-9 { color: var(--hl-9); }
|
||||
.hl-10 { color: var(--hl-10); }
|
||||
.hl-11 { color: var(--hl-11); }
|
||||
.hl-12 { color: var(--hl-12); }
|
||||
.hl-13 { color: var(--hl-13); }
|
||||
pre, code { background: var(--code-background); }
|
||||
59
typedoc/assets/main.js
Normal file
59
typedoc/assets/main.js
Normal file
File diff suppressed because one or more lines are too long
1
typedoc/assets/navigation.js
Normal file
1
typedoc/assets/navigation.js
Normal file
@@ -0,0 +1 @@
|
||||
window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA4WU0U6DMBRA/6XPi7jFTd3r3KKJSxZGfND4UMtlNJaW9F4MaPx3s7nNAqW+cu45UHLh5YsR1MTmbGGK0gKiNJqNWMkpZ3MGuiowctBFToViI/YudcrmN9+js59IBUlTQlc+XR82l8R3a4kFJ5H/2UJxRMDIpe3GeOJWVkAi35rKCuhHHBhsSAWDiTMLFTbr/Xmxrx9B0LWGjDDKIx9JyI4BjfqA9ImrChZc5J4z9GdCxW3OLaQbawqJQ8X+TKjYiUhNYDMuACOPOpnO3CXRZBuveiAh9R54Ctbr/qKQHHO9gxiwNBr9j96aCKW6m+U0fIvVlu9AHL/CVaXFX4SaEjBq007n8vZ6PJ04rbeGABPTfS9ZpQVJozFqDbRrsysnlEmd7tfa1zixgK6AZwoo5khgH3njf5j+VCBJUsFDmpjnuvG1HPxPZP/LWtY0FDniQOSzbhKTHO7nizi4F3n9AcMPx1+WBQAA"
|
||||
1
typedoc/assets/search.js
Normal file
1
typedoc/assets/search.js
Normal file
@@ -0,0 +1 @@
|
||||
window.searchData = "data:application/octet-stream;base64,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";
|
||||
1414
typedoc/assets/style.css
Normal file
1414
typedoc/assets/style.css
Normal file
File diff suppressed because it is too large
Load Diff
32
typedoc/classes/EtagMismatch.html
Normal file
32
typedoc/classes/EtagMismatch.html
Normal file
File diff suppressed because one or more lines are too long
16
typedoc/classes/FetchSource.html
Normal file
16
typedoc/classes/FetchSource.html
Normal file
File diff suppressed because one or more lines are too long
8
typedoc/classes/FileSource.html
Normal file
8
typedoc/classes/FileSource.html
Normal file
File diff suppressed because one or more lines are too long
22
typedoc/classes/PMTiles.html
Normal file
22
typedoc/classes/PMTiles.html
Normal file
File diff suppressed because one or more lines are too long
20
typedoc/classes/Protocol.html
Normal file
20
typedoc/classes/Protocol.html
Normal file
File diff suppressed because one or more lines are too long
13
typedoc/classes/ResolvedValueCache.html
Normal file
13
typedoc/classes/ResolvedValueCache.html
Normal file
File diff suppressed because one or more lines are too long
13
typedoc/classes/SharedPromiseCache.html
Normal file
13
typedoc/classes/SharedPromiseCache.html
Normal file
File diff suppressed because one or more lines are too long
9
typedoc/enums/Compression.html
Normal file
9
typedoc/enums/Compression.html
Normal file
File diff suppressed because one or more lines are too long
10
typedoc/enums/TileType.html
Normal file
10
typedoc/enums/TileType.html
Normal file
File diff suppressed because one or more lines are too long
2
typedoc/functions/bytesToHeader.html
Normal file
2
typedoc/functions/bytesToHeader.html
Normal file
File diff suppressed because one or more lines are too long
2
typedoc/functions/findTile.html
Normal file
2
typedoc/functions/findTile.html
Normal file
File diff suppressed because one or more lines are too long
3
typedoc/functions/leafletRasterLayer.html
Normal file
3
typedoc/functions/leafletRasterLayer.html
Normal file
File diff suppressed because one or more lines are too long
2
typedoc/functions/tileIdToZxy.html
Normal file
2
typedoc/functions/tileIdToZxy.html
Normal file
File diff suppressed because one or more lines are too long
1
typedoc/functions/tileTypeExt.html
Normal file
1
typedoc/functions/tileTypeExt.html
Normal file
File diff suppressed because one or more lines are too long
2
typedoc/functions/zxyToTileId.html
Normal file
2
typedoc/functions/zxyToTileId.html
Normal file
File diff suppressed because one or more lines are too long
1
typedoc/hierarchy.html
Normal file
1
typedoc/hierarchy.html
Normal file
File diff suppressed because one or more lines are too long
19
typedoc/index.html
Normal file
19
typedoc/index.html
Normal file
File diff suppressed because one or more lines are too long
5
typedoc/interfaces/Cache.html
Normal file
5
typedoc/interfaces/Cache.html
Normal file
File diff suppressed because one or more lines are too long
6
typedoc/interfaces/Entry.html
Normal file
6
typedoc/interfaces/Entry.html
Normal file
File diff suppressed because one or more lines are too long
28
typedoc/interfaces/Header.html
Normal file
28
typedoc/interfaces/Header.html
Normal file
File diff suppressed because one or more lines are too long
5
typedoc/interfaces/RangeResponse.html
Normal file
5
typedoc/interfaces/RangeResponse.html
Normal file
File diff suppressed because one or more lines are too long
6
typedoc/interfaces/Source.html
Normal file
6
typedoc/interfaces/Source.html
Normal file
File diff suppressed because one or more lines are too long
22
typedoc/modules.html
Normal file
22
typedoc/modules.html
Normal file
File diff suppressed because one or more lines are too long
4
typedoc/types/DecompressFunc.html
Normal file
4
typedoc/types/DecompressFunc.html
Normal file
File diff suppressed because one or more lines are too long
BIN
usgs-mt-whitney-8-15-webp-512.pmtiles
Normal file
BIN
usgs-mt-whitney-8-15-webp-512.pmtiles
Normal file
Binary file not shown.
Reference in New Issue
Block a user