@pdfme/converter 6.2.5 → 6.2.6-dev.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -18670,6 +18670,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18670
18670
|
requiredByDefault: boolean().optional(),
|
|
18671
18671
|
maxZoom: number().optional(),
|
|
18672
18672
|
sidebarOpen: boolean().optional(),
|
|
18673
|
+
leftSidebarWidth: number().positive().finite().optional(),
|
|
18674
|
+
rightSidebarWidth: number().positive().finite().optional(),
|
|
18673
18675
|
zoomLevel: number().optional()
|
|
18674
18676
|
});
|
|
18675
18677
|
var HTMLElementSchema = any().refine((v) => v instanceof HTMLElement);
|
|
@@ -18682,6 +18684,89 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18682
18684
|
var pt2mm = (pt) => {
|
|
18683
18685
|
return pt * PT_TO_MM_RATIO;
|
|
18684
18686
|
};
|
|
18687
|
+
var parseIpv4 = (host) => {
|
|
18688
|
+
const match = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/.exec(host);
|
|
18689
|
+
if (!match) return null;
|
|
18690
|
+
const octets = match.slice(1).map(Number);
|
|
18691
|
+
return octets.every((octet) => octet <= 255) ? octets : null;
|
|
18692
|
+
};
|
|
18693
|
+
var parseIpv6 = (host) => {
|
|
18694
|
+
let address = host.toLowerCase();
|
|
18695
|
+
const lastColon = address.lastIndexOf(":");
|
|
18696
|
+
const tail = address.slice(lastColon + 1);
|
|
18697
|
+
if (tail.includes(".")) {
|
|
18698
|
+
const octets = parseIpv4(tail);
|
|
18699
|
+
if (!octets) return null;
|
|
18700
|
+
const high = (octets[0] << 8 | octets[1]).toString(16);
|
|
18701
|
+
const low = (octets[2] << 8 | octets[3]).toString(16);
|
|
18702
|
+
address = `${address.slice(0, lastColon + 1)}${high}:${low}`;
|
|
18703
|
+
}
|
|
18704
|
+
const halves = address.split("::");
|
|
18705
|
+
if (halves.length > 2) return null;
|
|
18706
|
+
const toGroups = (part) => part === "" ? [] : part.split(":");
|
|
18707
|
+
const head = toGroups(halves[0]);
|
|
18708
|
+
let groups = head;
|
|
18709
|
+
if (halves.length === 2) {
|
|
18710
|
+
const rest = toGroups(halves[1]);
|
|
18711
|
+
const missing = 8 - head.length - rest.length;
|
|
18712
|
+
if (missing < 1) return null;
|
|
18713
|
+
groups = [
|
|
18714
|
+
...head,
|
|
18715
|
+
...Array(missing).fill("0"),
|
|
18716
|
+
...rest
|
|
18717
|
+
];
|
|
18718
|
+
}
|
|
18719
|
+
if (groups.length !== 8 || !groups.every((group) => /^[0-9a-f]{1,4}$/.test(group))) return null;
|
|
18720
|
+
return groups.map((group) => parseInt(group, 16));
|
|
18721
|
+
};
|
|
18722
|
+
var ipv4ToInt = (octets) => (octets[0] << 24 | octets[1] << 16 | octets[2] << 8 | octets[3]) >>> 0;
|
|
18723
|
+
var toIpv4Range = (cidr) => {
|
|
18724
|
+
const [address, prefix] = cidr.split("/");
|
|
18725
|
+
const prefixLength = Number(prefix);
|
|
18726
|
+
const mask = prefixLength === 0 ? 0 : -1 << 32 - prefixLength >>> 0;
|
|
18727
|
+
return {
|
|
18728
|
+
base: (ipv4ToInt(parseIpv4(address)) & mask) >>> 0,
|
|
18729
|
+
mask
|
|
18730
|
+
};
|
|
18731
|
+
};
|
|
18732
|
+
var toIpv6Range = (cidr) => {
|
|
18733
|
+
const [address, prefix] = cidr.split("/");
|
|
18734
|
+
return {
|
|
18735
|
+
base: parseIpv6(address),
|
|
18736
|
+
prefixLength: Number(prefix)
|
|
18737
|
+
};
|
|
18738
|
+
};
|
|
18739
|
+
[
|
|
18740
|
+
"0.0.0.0/8",
|
|
18741
|
+
"10.0.0.0/8",
|
|
18742
|
+
"100.64.0.0/10",
|
|
18743
|
+
"127.0.0.0/8",
|
|
18744
|
+
"169.254.0.0/16",
|
|
18745
|
+
"172.16.0.0/12",
|
|
18746
|
+
"192.0.0.0/24",
|
|
18747
|
+
"192.0.2.0/24",
|
|
18748
|
+
"192.88.99.0/24",
|
|
18749
|
+
"192.168.0.0/16",
|
|
18750
|
+
"198.18.0.0/15",
|
|
18751
|
+
"198.51.100.0/24",
|
|
18752
|
+
"203.0.113.0/24",
|
|
18753
|
+
"224.0.0.0/4",
|
|
18754
|
+
"240.0.0.0/4"
|
|
18755
|
+
].map(toIpv4Range);
|
|
18756
|
+
[
|
|
18757
|
+
"::/96",
|
|
18758
|
+
"100::/64",
|
|
18759
|
+
"2001::/32",
|
|
18760
|
+
"2001:db8::/32",
|
|
18761
|
+
"64:ff9b:1::/48",
|
|
18762
|
+
"fc00::/7",
|
|
18763
|
+
"fe80::/10",
|
|
18764
|
+
"fec0::/10",
|
|
18765
|
+
"ff00::/8"
|
|
18766
|
+
].map(toIpv6Range);
|
|
18767
|
+
toIpv6Range("::ffff:0:0/96");
|
|
18768
|
+
toIpv6Range("64:ff9b::/96");
|
|
18769
|
+
toIpv6Range("2002::/16");
|
|
18685
18770
|
Object.hasOwnProperty;
|
|
18686
18771
|
//#endregion
|
|
18687
18772
|
//#region src/pdf2size.ts
|
|
@@ -18746,4 +18831,4 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18746
18831
|
//#endregion
|
|
18747
18832
|
})();
|
|
18748
18833
|
|
|
18749
|
-
//# sourceMappingURL=clawpdf-worker-
|
|
18834
|
+
//# sourceMappingURL=clawpdf-worker-D71IyYxj.js.map
|