@utilix-tech/sdk 0.43.0 → 0.45.0

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.
package/dist/index.cjs CHANGED
@@ -7999,12 +7999,14 @@ __export(units_exports, {
7999
7999
  calcSubnet: () => calcSubnet,
8000
8000
  calculateBreakEven: () => calculateBreakEven,
8001
8001
  calculateCashBreakdown: () => calculateCashBreakdown,
8002
+ calculateCdMaturity: () => calculateCdMaturity,
8002
8003
  calculateChange: () => calculateChange,
8003
8004
  calculateCompoundInterest: () => calculateCompoundInterest,
8004
8005
  calculateDiscount: () => calculateDiscount,
8005
8006
  calculateEmi: () => calculateEmi,
8006
8007
  calculateLoan: () => calculateLoan,
8007
8008
  calculateMarginMarkup: () => calculateMarginMarkup,
8009
+ calculatePaybackPeriod: () => calculatePaybackPeriod,
8008
8010
  calculatePercentageChange: () => calculatePercentageChange,
8009
8011
  calculateRoi: () => calculateRoi,
8010
8012
  calculateRuleOf72: () => calculateRuleOf72,
@@ -9905,21 +9907,117 @@ function calculateChange(amountDue, amountTendered, denominations) {
9905
9907
  remainder: breakdown.remainder
9906
9908
  };
9907
9909
  }
9910
+ function _computePayback(initialInvestment, flows) {
9911
+ const round4 = (n) => Math.round(n * 1e4) / 1e4;
9912
+ let cumulative = 0;
9913
+ const cumulativeCashFlows = [];
9914
+ let period = null;
9915
+ for (let i = 0; i < flows.length; i++) {
9916
+ const prevCumulative = cumulative;
9917
+ cumulative += flows[i];
9918
+ cumulativeCashFlows.push(round4(cumulative));
9919
+ if (period === null && cumulative >= initialInvestment) {
9920
+ const remaining = initialInvestment - prevCumulative;
9921
+ const fraction = flows[i] !== 0 ? remaining / flows[i] : 0;
9922
+ period = i + fraction;
9923
+ }
9924
+ }
9925
+ return { cumulative: cumulativeCashFlows, period };
9926
+ }
9927
+ function calculatePaybackPeriod(input) {
9928
+ const { initialInvestment, cashFlows, discountRatePercent } = input;
9929
+ const round4 = (n) => Math.round(n * 1e4) / 1e4;
9930
+ if (!Number.isFinite(initialInvestment) || initialInvestment <= 0) {
9931
+ return { error: "initialInvestment must be a finite number greater than zero" };
9932
+ }
9933
+ if (!Array.isArray(cashFlows) || cashFlows.length === 0) {
9934
+ return { error: "cashFlows must be a non-empty array of numbers" };
9935
+ }
9936
+ if (cashFlows.some((f) => !Number.isFinite(f))) {
9937
+ return { error: "Every cash flow must be a finite number" };
9938
+ }
9939
+ const { cumulative, period } = _computePayback(initialInvestment, cashFlows);
9940
+ const result = {
9941
+ initialInvestment: round4(initialInvestment),
9942
+ cashFlows: cashFlows.map(round4),
9943
+ cumulativeCashFlows: cumulative,
9944
+ paybackPeriod: period !== null ? round4(period) : null,
9945
+ paybackPeriodRounded: period !== null ? Math.ceil(period) : null,
9946
+ recovered: period !== null
9947
+ };
9948
+ if (discountRatePercent !== void 0) {
9949
+ if (!Number.isFinite(discountRatePercent) || discountRatePercent < 0) {
9950
+ return { error: "discountRatePercent must be a finite, non-negative number when provided" };
9951
+ }
9952
+ const r = discountRatePercent / 100;
9953
+ const discountedCashFlows = cashFlows.map((f, i) => f / Math.pow(1 + r, i + 1));
9954
+ const { cumulative: discountedCumulative, period: discountedPeriod } = _computePayback(initialInvestment, discountedCashFlows);
9955
+ result.discountRatePercent = round4(discountRatePercent);
9956
+ result.discountedCashFlows = discountedCashFlows.map(round4);
9957
+ result.discountedCumulativeCashFlows = discountedCumulative;
9958
+ result.discountedPaybackPeriod = discountedPeriod !== null ? round4(discountedPeriod) : null;
9959
+ result.discountedPaybackPeriodRounded = discountedPeriod !== null ? Math.ceil(discountedPeriod) : null;
9960
+ result.discountedRecovered = discountedPeriod !== null;
9961
+ }
9962
+ return result;
9963
+ }
9964
+ function calculateCdMaturity(principal, annualRatePercent, termMonths, compoundsPerYear, earlyWithdrawalPenaltyMonths) {
9965
+ if (!Number.isFinite(principal) || principal <= 0) return { error: "Principal must be a finite number greater than zero" };
9966
+ if (!Number.isFinite(annualRatePercent) || annualRatePercent < 0) {
9967
+ return { error: "Annual interest rate must be zero or a positive number" };
9968
+ }
9969
+ if (!Number.isFinite(termMonths) || termMonths <= 0) return { error: "Term must be a positive number of months" };
9970
+ if (!Number.isInteger(compoundsPerYear) || compoundsPerYear <= 0) {
9971
+ return { error: "Compounding frequency must be a positive whole number of periods per year" };
9972
+ }
9973
+ if (earlyWithdrawalPenaltyMonths !== void 0 && (!Number.isFinite(earlyWithdrawalPenaltyMonths) || earlyWithdrawalPenaltyMonths < 0)) {
9974
+ return { error: "earlyWithdrawalPenaltyMonths must be zero or a positive number when provided" };
9975
+ }
9976
+ const round23 = (n) => Math.round(n * 100) / 100;
9977
+ const round4 = (n) => Math.round(n * 1e4) / 1e4;
9978
+ const ratePerPeriod = annualRatePercent / 100 / compoundsPerYear;
9979
+ const totalPeriods = compoundsPerYear * (termMonths / 12);
9980
+ const growth = ratePerPeriod === 0 ? 1 : Math.pow(1 + ratePerPeriod, totalPeriods);
9981
+ const maturityValue = principal * growth;
9982
+ const totalInterest = maturityValue - principal;
9983
+ const apy = ratePerPeriod === 0 ? 0 : (Math.pow(1 + ratePerPeriod, compoundsPerYear) - 1) * 100;
9984
+ const result = {
9985
+ principal: round23(principal),
9986
+ annualRatePercent: round4(annualRatePercent),
9987
+ termMonths,
9988
+ compoundsPerYear,
9989
+ maturityValue: round23(maturityValue),
9990
+ totalInterest: round23(totalInterest),
9991
+ apy: round4(apy)
9992
+ };
9993
+ if (earlyWithdrawalPenaltyMonths !== void 0) {
9994
+ const monthlyRate = annualRatePercent / 100 / 12;
9995
+ const forfeited = Math.min(principal * monthlyRate * earlyWithdrawalPenaltyMonths, Math.max(totalInterest, 0));
9996
+ result.earlyWithdrawalPenaltyMonths = earlyWithdrawalPenaltyMonths;
9997
+ result.earlyWithdrawalForfeitedInterest = round23(forfeited);
9998
+ result.earlyWithdrawalPayout = round23(maturityValue - forfeited);
9999
+ }
10000
+ return result;
10001
+ }
9908
10002
 
9909
10003
  // src/tools/network.ts
9910
10004
  var network_exports = {};
9911
10005
  __export(network_exports, {
10006
+ CLIENT_HINTS: () => CLIENT_HINTS,
9912
10007
  DNS_RECORD_TYPES: () => DNS_RECORD_TYPES,
9913
10008
  HTTP_HEADERS: () => HTTP_HEADERS,
9914
10009
  LINK_REL_VALUES: () => LINK_REL_VALUES,
10010
+ PERMISSIONS_POLICY_FEATURES: () => PERMISSIONS_POLICY_FEATURES,
9915
10011
  REFERRER_POLICY_VALUES: () => REFERRER_POLICY_VALUES,
9916
10012
  STATUS_CODES: () => STATUS_CODES,
9917
10013
  analyzeEmailHeaders: () => analyzeEmailHeaders,
9918
10014
  buildCacheControl: () => buildCacheControl,
10015
+ buildClientHints: () => buildClientHints,
9919
10016
  buildDnsQueryUrl: () => buildDnsQueryUrl,
9920
10017
  buildGeoUrl: () => buildGeoUrl,
9921
10018
  buildLinkHeader: () => buildLinkHeader,
9922
10019
  buildMapUrl: () => buildMapUrl,
10020
+ buildPermissionsPolicy: () => buildPermissionsPolicy,
9923
10021
  buildRangeHeader: () => buildRangeHeader,
9924
10022
  buildReferrerPolicy: () => buildReferrerPolicy,
9925
10023
  buildVaryHeader: () => buildVaryHeader,
@@ -9938,11 +10036,13 @@ __export(network_exports, {
9938
10036
  isValidIp: () => isValidIp2,
9939
10037
  isValidIpv4: () => isValidIpv42,
9940
10038
  isValidIpv6: () => isValidIpv6,
10039
+ parseClientHintHeaders: () => parseClientHintHeaders,
9941
10040
  parseContentRangeHeader: () => parseContentRangeHeader,
9942
10041
  parseDnsResponse: () => parseDnsResponse,
9943
10042
  parseGeoResponse: () => parseGeoResponse,
9944
10043
  parseHar: () => parseHar,
9945
10044
  parseIpv6Address: () => parseIpv6Address,
10045
+ parsePermissionsPolicy: () => parsePermissionsPolicy,
9946
10046
  parseUserAgent: () => parseUserAgent,
9947
10047
  parseVaryHeader: () => parseVaryHeader,
9948
10048
  searchHeaders: () => searchHeaders,
@@ -12377,6 +12477,207 @@ function validateManifest(jsonText) {
12377
12477
  }
12378
12478
  };
12379
12479
  }
12480
+ var PERMISSIONS_POLICY_NOTES = {
12481
+ camera: "Controls access to video capture devices (getUserMedia video).",
12482
+ microphone: "Controls access to audio capture devices (getUserMedia audio).",
12483
+ geolocation: "Controls access to the Geolocation API.",
12484
+ autoplay: "Controls whether media elements can autoplay without a user gesture.",
12485
+ fullscreen: "Controls access to the Fullscreen API (requestFullscreen).",
12486
+ payment: "Controls access to the Payment Request API.",
12487
+ usb: "Controls access to the WebUSB API.",
12488
+ accelerometer: "Controls access to the Accelerometer sensor API.",
12489
+ gyroscope: "Controls access to the Gyroscope sensor API.",
12490
+ magnetometer: "Controls access to the Magnetometer sensor API.",
12491
+ midi: "Controls access to the Web MIDI API.",
12492
+ "picture-in-picture": "Controls whether video elements can enter picture-in-picture mode.",
12493
+ "sync-xhr": "Controls whether synchronous XMLHttpRequest is allowed.",
12494
+ "display-capture": "Controls access to screen/tab capture (getDisplayMedia).",
12495
+ "encrypted-media": "Controls access to the Encrypted Media Extensions API (DRM playback).",
12496
+ "clipboard-read": "Controls read access to the async Clipboard API.",
12497
+ "clipboard-write": "Controls write access to the async Clipboard API.",
12498
+ "screen-wake-lock": "Controls access to the Screen Wake Lock API.",
12499
+ "web-share": "Controls access to the Web Share API.",
12500
+ "xr-spatial-tracking": "Controls access to WebXR device sensors and spatial tracking."
12501
+ };
12502
+ var PERMISSIONS_POLICY_FEATURES = Object.keys(PERMISSIONS_POLICY_NOTES);
12503
+ function _formatPermissionsPolicyAllowlist(allowlist) {
12504
+ if (allowlist.includes("*")) return "*";
12505
+ if (allowlist.length === 0) return "()";
12506
+ return "(" + allowlist.map((o) => o === "self" ? "self" : `"${o}"`).join(" ") + ")";
12507
+ }
12508
+ function buildPermissionsPolicy(features) {
12509
+ if (!Array.isArray(features) || features.length === 0) return { error: "At least one feature is required" };
12510
+ const warnings = [];
12511
+ const seen = /* @__PURE__ */ new Map();
12512
+ for (const f of features) {
12513
+ if (!f || typeof f.feature !== "string" || f.feature.trim() === "") continue;
12514
+ const name = f.feature.trim().toLowerCase();
12515
+ const allowlist = Array.isArray(f.allowlist) ? f.allowlist.map((o) => typeof o === "string" ? o.trim() : "").filter((o) => o.length > 0) : [];
12516
+ if (seen.has(name)) warnings.push(`duplicate feature "${name}" was merged, the last occurrence wins`);
12517
+ seen.set(name, { feature: name, allowlist });
12518
+ }
12519
+ if (seen.size === 0) return { error: "At least one feature is required" };
12520
+ const directives = [];
12521
+ for (const { feature, allowlist } of seen.values()) {
12522
+ if (!PERMISSIONS_POLICY_NOTES[feature]) {
12523
+ warnings.push(`"${feature}" is not a widely recognized feature name, it will still be included as written`);
12524
+ }
12525
+ if (allowlist.includes("*") && allowlist.length > 1) {
12526
+ warnings.push(`"${feature}" combines "*" with other origins; "*" already allows every origin so the others are redundant`);
12527
+ }
12528
+ const invalidOrigin = allowlist.find((o) => o !== "self" && o !== "*" && !/^https?:\/\//i.test(o));
12529
+ if (invalidOrigin) {
12530
+ warnings.push(`"${invalidOrigin}" on "${feature}" doesn't look like an origin (expected "self", "*", or an http(s):// URL); it will still be quoted as written`);
12531
+ }
12532
+ directives.push({
12533
+ feature,
12534
+ value: _formatPermissionsPolicyAllowlist(allowlist),
12535
+ note: PERMISSIONS_POLICY_NOTES[feature] ?? `Controls access to the "${feature}" feature.`
12536
+ });
12537
+ }
12538
+ const headerValue = directives.map((d) => `${d.feature}=${d.value}`).join(", ");
12539
+ return { header: `Permissions-Policy: ${headerValue}`, headerValue, directives, warnings };
12540
+ }
12541
+ function _splitPermissionsPolicyTopLevel(input) {
12542
+ const segments = [];
12543
+ let depth = 0;
12544
+ let current = "";
12545
+ for (const ch of input) {
12546
+ if (ch === "(") depth++;
12547
+ if (ch === ")") depth--;
12548
+ if (ch === "," && depth === 0) {
12549
+ if (current.trim()) segments.push(current.trim());
12550
+ current = "";
12551
+ } else {
12552
+ current += ch;
12553
+ }
12554
+ }
12555
+ if (current.trim()) segments.push(current.trim());
12556
+ return segments;
12557
+ }
12558
+ function _parsePermissionsPolicyAllowlist(rawValue) {
12559
+ if (rawValue === "*") return ["*"];
12560
+ if (rawValue === "()" || rawValue === "") return [];
12561
+ const inner = rawValue.replace(/^\(/, "").replace(/\)$/, "");
12562
+ const tokens = inner.match(/"[^"]*"|\S+/g) ?? [];
12563
+ return tokens.map((t) => t.replace(/^"|"$/g, ""));
12564
+ }
12565
+ function parsePermissionsPolicy(raw) {
12566
+ if (!raw || raw.trim() === "") return { error: "Input is empty" };
12567
+ const withoutLabel = raw.trim().replace(/^permissions-policy:\s*/i, "");
12568
+ const segments = _splitPermissionsPolicyTopLevel(withoutLabel);
12569
+ if (segments.length === 0) return { error: "No directives found" };
12570
+ const features = [];
12571
+ for (const segment of segments) {
12572
+ const eq = segment.indexOf("=");
12573
+ if (eq === -1) continue;
12574
+ const feature = segment.slice(0, eq).trim();
12575
+ const rawValue = segment.slice(eq + 1).trim();
12576
+ features.push({ feature, allowlist: _parsePermissionsPolicyAllowlist(rawValue) });
12577
+ }
12578
+ if (features.length === 0) return { error: "No directives found" };
12579
+ return buildPermissionsPolicy(features);
12580
+ }
12581
+ var CLIENT_HINTS = [
12582
+ { name: "Sec-CH-UA", description: "The browser's brand(s) and significant version, sent automatically on every request without an Accept-CH opt-in.", lowEntropy: true, valueType: "sf-list-brand" },
12583
+ { name: "Sec-CH-UA-Mobile", description: "Whether the browser is running on a mobile device (?1) or not (?0).", lowEntropy: true, valueType: "boolean" },
12584
+ { name: "Sec-CH-UA-Platform", description: 'The platform/OS the browser is running on, e.g. "Windows" or "Android".', lowEntropy: true, valueType: "string" },
12585
+ { name: "Sec-CH-UA-Full-Version-List", description: "The full version number for each brand in the user agent, not just the significant version.", lowEntropy: false, valueType: "sf-list-brand" },
12586
+ { name: "Sec-CH-UA-Platform-Version", description: 'The exact OS version, e.g. "15.0.0".', lowEntropy: false, valueType: "string" },
12587
+ { name: "Sec-CH-UA-Arch", description: 'The underlying CPU architecture, e.g. "x86" or "arm".', lowEntropy: false, valueType: "string" },
12588
+ { name: "Sec-CH-UA-Bitness", description: 'The CPU architecture bitness, e.g. "64".', lowEntropy: false, valueType: "string" },
12589
+ { name: "Sec-CH-UA-Model", description: "The device model, mostly populated on mobile devices.", lowEntropy: false, valueType: "string" },
12590
+ { name: "Sec-CH-UA-WoW64", description: "Whether a 32-bit browser is running on 64-bit Windows.", lowEntropy: false, valueType: "boolean" },
12591
+ { name: "Sec-CH-UA-Form-Factor", description: `The device's form factor, e.g. "Desktop", "Mobile", "Tablet", or "XR".`, lowEntropy: false, valueType: "string" },
12592
+ { name: "Sec-CH-Prefers-Color-Scheme", description: "The user's preferred color scheme, mirrors the prefers-color-scheme media feature.", lowEntropy: false, valueType: "string" },
12593
+ { name: "Sec-CH-Prefers-Reduced-Motion", description: "Whether the user has requested reduced motion.", lowEntropy: false, valueType: "string" },
12594
+ { name: "Sec-CH-Prefers-Reduced-Transparency", description: "Whether the user has requested reduced transparency.", lowEntropy: false, valueType: "string" },
12595
+ { name: "Sec-CH-Viewport-Width", description: "The layout viewport width in CSS pixels.", lowEntropy: false, valueType: "number" },
12596
+ { name: "Sec-CH-Viewport-Height", description: "The layout viewport height in CSS pixels.", lowEntropy: false, valueType: "number" },
12597
+ { name: "Sec-CH-DPR", description: "The device pixel ratio.", lowEntropy: false, valueType: "number" },
12598
+ { name: "Sec-CH-Width", description: "The intrinsic width of a requested image resource, set per-request via the image's `sizes` attribute.", lowEntropy: false, valueType: "number" },
12599
+ { name: "Sec-CH-Device-Memory", description: "Approximate device RAM in GiB, rounded to the nearest power of two for privacy.", lowEntropy: false, valueType: "number" },
12600
+ { name: "Save-Data", description: "Legacy hint signaling the user opted into a reduced-data mode; sent automatically like a low-entropy hint.", lowEntropy: true, valueType: "boolean" }
12601
+ ];
12602
+ function _findClientHint(raw) {
12603
+ const normalized = raw.trim().toLowerCase();
12604
+ return CLIENT_HINTS.find((d) => d.name.toLowerCase() === normalized);
12605
+ }
12606
+ function buildClientHints(hintNames, criticalHintNames = []) {
12607
+ if (!Array.isArray(hintNames) || hintNames.length === 0) return { error: "At least one client hint is required" };
12608
+ const resolved = [];
12609
+ for (const raw of hintNames) {
12610
+ if (typeof raw !== "string" || raw.trim() === "") continue;
12611
+ const def = _findClientHint(raw);
12612
+ if (!def) return { error: `Unknown client hint: "${raw}"` };
12613
+ resolved.push(def);
12614
+ }
12615
+ if (resolved.length === 0) return { error: "At least one client hint is required" };
12616
+ const critical = [];
12617
+ if (Array.isArray(criticalHintNames)) {
12618
+ for (const raw of criticalHintNames) {
12619
+ if (typeof raw !== "string" || raw.trim() === "") continue;
12620
+ const def = _findClientHint(raw);
12621
+ if (!def) return { error: `Unknown client hint: "${raw}"` };
12622
+ if (!resolved.some((d) => d.name === def.name)) {
12623
+ return { error: `Critical hint "${def.name}" must also be included in hintNames` };
12624
+ }
12625
+ critical.push(def);
12626
+ }
12627
+ }
12628
+ const uniqueNames = Array.from(new Set(resolved.map((d) => d.name)));
12629
+ const result = {
12630
+ acceptCH: uniqueNames.join(", "),
12631
+ hints: resolved.map((d) => ({ name: d.name, description: d.description, lowEntropy: d.lowEntropy }))
12632
+ };
12633
+ if (critical.length > 0) {
12634
+ result.criticalCH = Array.from(new Set(critical.map((d) => d.name))).join(", ");
12635
+ }
12636
+ return result;
12637
+ }
12638
+ function _decodeClientHintValue(valueType, rawValue) {
12639
+ switch (valueType) {
12640
+ case "boolean":
12641
+ if (rawValue === "?1") return true;
12642
+ if (rawValue === "?0") return false;
12643
+ return rawValue;
12644
+ case "string":
12645
+ return rawValue.replace(/^"|"$/g, "");
12646
+ case "number": {
12647
+ const n = Number(rawValue);
12648
+ return Number.isFinite(n) ? n : rawValue;
12649
+ }
12650
+ case "sf-list-brand":
12651
+ return rawValue.split(",").map((part) => {
12652
+ const m = part.trim().match(/^"([^"]*)";v="([^"]*)"$/);
12653
+ return m ? { brand: m[1], version: m[2] } : { raw: part.trim() };
12654
+ });
12655
+ default:
12656
+ return rawValue;
12657
+ }
12658
+ }
12659
+ function parseClientHintHeaders(rawHeaders) {
12660
+ if (typeof rawHeaders !== "string" || rawHeaders.trim() === "") return { error: "Provide one or more header lines to parse" };
12661
+ const lines = rawHeaders.split("\n").map((l) => l.trim()).filter((l) => l.length > 0);
12662
+ const hints = [];
12663
+ const unrecognized = [];
12664
+ for (const line of lines) {
12665
+ const idx = line.indexOf(":");
12666
+ if (idx === -1) continue;
12667
+ const name = line.slice(0, idx).trim();
12668
+ const rawValue = line.slice(idx + 1).trim();
12669
+ const def = _findClientHint(name);
12670
+ if (!def) {
12671
+ unrecognized.push({ name, rawValue });
12672
+ continue;
12673
+ }
12674
+ hints.push({ name: def.name, rawValue, description: def.description, value: _decodeClientHintValue(def.valueType, rawValue) });
12675
+ }
12676
+ if (hints.length === 0 && unrecognized.length === 0) {
12677
+ return { error: 'No parsable header lines found (expected "Header-Name: value" per line)' };
12678
+ }
12679
+ return { hints, unrecognized };
12680
+ }
12380
12681
 
12381
12682
  // src/tools/api.ts
12382
12683
  var api_exports = {};
package/dist/index.d.cts CHANGED
@@ -5,8 +5,8 @@ export { t as text } from './text-kHkT9VtT.cjs';
5
5
  export { d as data } from './data-BKpEOcOX.cjs';
6
6
  export { g as generators } from './generators-Du8cBesn.cjs';
7
7
  export { t as time } from './time-KqJjdqII.cjs';
8
- export { u as units } from './units-CzPwRC03.cjs';
9
- export { n as network } from './network-DISiPMoK.cjs';
8
+ export { u as units } from './units-DWRmbS_a.cjs';
9
+ export { n as network } from './network-Bzm1tjMA.cjs';
10
10
  export { a as api } from './api-DmTNE4c1.cjs';
11
11
  export { c as code } from './code-KXoRsHtl.cjs';
12
12
  export { c as color } from './color-tPwZCr9H.cjs';
package/dist/index.d.ts CHANGED
@@ -5,8 +5,8 @@ export { t as text } from './text-kHkT9VtT.js';
5
5
  export { d as data } from './data-BKpEOcOX.js';
6
6
  export { g as generators } from './generators-Du8cBesn.js';
7
7
  export { t as time } from './time-KqJjdqII.js';
8
- export { u as units } from './units-CzPwRC03.js';
9
- export { n as network } from './network-DISiPMoK.js';
8
+ export { u as units } from './units-DWRmbS_a.js';
9
+ export { n as network } from './network-Bzm1tjMA.js';
10
10
  export { a as api } from './api-DmTNE4c1.js';
11
11
  export { c as code } from './code-KXoRsHtl.js';
12
12
  export { c as color } from './color-tPwZCr9H.js';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export { media_exports as media } from './chunk-L6V4W4SU.js';
2
- export { units_exports as units } from './chunk-2MTHD2LG.js';
3
- export { network_exports as network } from './chunk-XPNZYPM5.js';
2
+ export { units_exports as units } from './chunk-DFLHX4NW.js';
3
+ export { network_exports as network } from './chunk-7PEKYLRB.js';
4
4
  export { api_exports as api } from './chunk-52ZDKSIX.js';
5
5
  export { code_exports as code } from './chunk-JL7YTXRB.js';
6
6
  export { color_exports as color } from './chunk-BPVAB4P2.js';
@@ -19,6 +19,7 @@
19
19
  * - email-header-analyzer: analyzeEmailHeaders
20
20
  * - http-range-header-builder: buildRangeHeader, parseContentRangeHeader
21
21
  * - vary-header-builder: buildVaryHeader, parseVaryHeader
22
+ * - permissions-policy-builder: buildPermissionsPolicy, parsePermissionsPolicy
22
23
  */
23
24
  declare const DNS_RECORD_TYPES: readonly ["A", "AAAA", "CNAME", "MX", "TXT", "NS", "SOA", "PTR", "SRV", "CAA"];
24
25
  type DnsRecordType = typeof DNS_RECORD_TYPES[number];
@@ -558,12 +559,101 @@ interface ManifestValidationResult {
558
559
  declare function validateManifest(jsonText: string): ManifestValidationResult | {
559
560
  error: string;
560
561
  };
562
+ interface PermissionsPolicyFeatureInput {
563
+ feature: string;
564
+ allowlist: string[];
565
+ }
566
+ interface PermissionsPolicyDirective {
567
+ feature: string;
568
+ value: string;
569
+ note: string;
570
+ }
571
+ interface PermissionsPolicyResult {
572
+ header: string;
573
+ headerValue: string;
574
+ directives: PermissionsPolicyDirective[];
575
+ warnings: string[];
576
+ }
577
+ declare const PERMISSIONS_POLICY_FEATURES: string[];
578
+ /**
579
+ * Build a `Permissions-Policy` response-header value from a list of browser
580
+ * features and their per-feature allowlist (`self`, specific origins, `*`
581
+ * for all origins, or an empty allowlist to disable the feature entirely),
582
+ * attaching a plain-English note on what each feature restricts.
583
+ */
584
+ declare function buildPermissionsPolicy(features: PermissionsPolicyFeatureInput[]): PermissionsPolicyResult | {
585
+ error: string;
586
+ };
587
+ /**
588
+ * Parse an existing `Permissions-Policy` header value (with or without a
589
+ * leading `Permissions-Policy:` label) into the same shape
590
+ * `buildPermissionsPolicy` returns, for explaining a header you found on a
591
+ * real response rather than building one from scratch.
592
+ */
593
+ declare function parsePermissionsPolicy(raw: string): PermissionsPolicyResult | {
594
+ error: string;
595
+ };
596
+ type ClientHintValueType = 'sf-list-brand' | 'boolean' | 'string' | 'number';
597
+ interface ClientHintDef {
598
+ name: string;
599
+ description: string;
600
+ lowEntropy: boolean;
601
+ valueType: ClientHintValueType;
602
+ }
603
+ declare const CLIENT_HINTS: ClientHintDef[];
604
+ interface ClientHintsBuildResult {
605
+ acceptCH: string;
606
+ criticalCH?: string;
607
+ hints: {
608
+ name: string;
609
+ description: string;
610
+ lowEntropy: boolean;
611
+ }[];
612
+ }
613
+ /**
614
+ * Build an `Accept-CH` response-header value from a list of client hint
615
+ * names the server wants the browser to send on future requests, attaching
616
+ * a plain-English note on what each hint reveals. Pass a subset of those
617
+ * names as `criticalHintNames` to also build a `Critical-CH` header value,
618
+ * for hints the server needs on the very first request of a session.
619
+ */
620
+ declare function buildClientHints(hintNames: string[], criticalHintNames?: string[]): ClientHintsBuildResult | {
621
+ error: string;
622
+ };
623
+ interface ParsedClientHint {
624
+ name: string;
625
+ rawValue: string;
626
+ description: string;
627
+ value: unknown;
628
+ }
629
+ interface ClientHintsParseResult {
630
+ hints: ParsedClientHint[];
631
+ unrecognized: {
632
+ name: string;
633
+ rawValue: string;
634
+ }[];
635
+ }
636
+ /**
637
+ * Parse raw request-header text, one `Header-Name: value` per line, into
638
+ * decoded client hint values: brand/version pairs for Sec-CH-UA-style
639
+ * headers, booleans for `?1`/`?0` values, unquoted strings, and numbers.
640
+ * Lines whose header name isn't a recognized client hint are returned
641
+ * separately under `unrecognized` rather than dropped.
642
+ */
643
+ declare function parseClientHintHeaders(rawHeaders: string): ClientHintsParseResult | {
644
+ error: string;
645
+ };
561
646
 
562
647
  type network_AuthResultEntry = AuthResultEntry;
563
648
  type network_BuildRangeHeaderOptions = BuildRangeHeaderOptions;
649
+ declare const network_CLIENT_HINTS: typeof CLIENT_HINTS;
564
650
  type network_CacheControlDirective = CacheControlDirective;
565
651
  type network_CacheControlOptions = CacheControlOptions;
566
652
  type network_CacheControlResult = CacheControlResult;
653
+ type network_ClientHintDef = ClientHintDef;
654
+ type network_ClientHintValueType = ClientHintValueType;
655
+ type network_ClientHintsBuildResult = ClientHintsBuildResult;
656
+ type network_ClientHintsParseResult = ClientHintsParseResult;
567
657
  type network_ContentRangeResult = ContentRangeResult;
568
658
  type network_CookieAttributes = CookieAttributes;
569
659
  type network_CookieCheckResult = CookieCheckResult;
@@ -590,8 +680,13 @@ type network_LinkRel = LinkRel;
590
680
  type network_ManifestIconInfo = ManifestIconInfo;
591
681
  type network_ManifestIssue = ManifestIssue;
592
682
  type network_ManifestValidationResult = ManifestValidationResult;
683
+ declare const network_PERMISSIONS_POLICY_FEATURES: typeof PERMISSIONS_POLICY_FEATURES;
684
+ type network_ParsedClientHint = ParsedClientHint;
593
685
  type network_ParsedDnsResult = ParsedDnsResult;
594
686
  type network_ParsedGeoResult = ParsedGeoResult;
687
+ type network_PermissionsPolicyDirective = PermissionsPolicyDirective;
688
+ type network_PermissionsPolicyFeatureInput = PermissionsPolicyFeatureInput;
689
+ type network_PermissionsPolicyResult = PermissionsPolicyResult;
595
690
  declare const network_REFERRER_POLICY_VALUES: typeof REFERRER_POLICY_VALUES;
596
691
  type network_RangeEntry = RangeEntry;
597
692
  type network_RangeEntryInput = RangeEntryInput;
@@ -617,10 +712,12 @@ type network_VaryHeaderEntry = VaryHeaderEntry;
617
712
  type network_VaryHeaderResult = VaryHeaderResult;
618
713
  declare const network_analyzeEmailHeaders: typeof analyzeEmailHeaders;
619
714
  declare const network_buildCacheControl: typeof buildCacheControl;
715
+ declare const network_buildClientHints: typeof buildClientHints;
620
716
  declare const network_buildDnsQueryUrl: typeof buildDnsQueryUrl;
621
717
  declare const network_buildGeoUrl: typeof buildGeoUrl;
622
718
  declare const network_buildLinkHeader: typeof buildLinkHeader;
623
719
  declare const network_buildMapUrl: typeof buildMapUrl;
720
+ declare const network_buildPermissionsPolicy: typeof buildPermissionsPolicy;
624
721
  declare const network_buildRangeHeader: typeof buildRangeHeader;
625
722
  declare const network_buildReferrerPolicy: typeof buildReferrerPolicy;
626
723
  declare const network_buildVaryHeader: typeof buildVaryHeader;
@@ -639,11 +736,13 @@ declare const network_isSuccess: typeof isSuccess;
639
736
  declare const network_isValidIp: typeof isValidIp;
640
737
  declare const network_isValidIpv4: typeof isValidIpv4;
641
738
  declare const network_isValidIpv6: typeof isValidIpv6;
739
+ declare const network_parseClientHintHeaders: typeof parseClientHintHeaders;
642
740
  declare const network_parseContentRangeHeader: typeof parseContentRangeHeader;
643
741
  declare const network_parseDnsResponse: typeof parseDnsResponse;
644
742
  declare const network_parseGeoResponse: typeof parseGeoResponse;
645
743
  declare const network_parseHar: typeof parseHar;
646
744
  declare const network_parseIpv6Address: typeof parseIpv6Address;
745
+ declare const network_parsePermissionsPolicy: typeof parsePermissionsPolicy;
647
746
  declare const network_parseUserAgent: typeof parseUserAgent;
648
747
  declare const network_parseVaryHeader: typeof parseVaryHeader;
649
748
  declare const network_searchHeaders: typeof searchHeaders;
@@ -657,7 +756,7 @@ declare const network_validateManifest: typeof validateManifest;
657
756
  declare const network_validateRobotsTxt: typeof validateRobotsTxt;
658
757
  declare const network_validateSitemap: typeof validateSitemap;
659
758
  declare namespace network {
660
- export { type network_AuthResultEntry as AuthResultEntry, type network_BuildRangeHeaderOptions as BuildRangeHeaderOptions, type network_CacheControlDirective as CacheControlDirective, type network_CacheControlOptions as CacheControlOptions, type network_CacheControlResult as CacheControlResult, type network_ContentRangeResult as ContentRangeResult, type network_CookieAttributes as CookieAttributes, type network_CookieCheckResult as CookieCheckResult, network_DNS_RECORD_TYPES as DNS_RECORD_TYPES, type network_DnsRecord as DnsRecord, type network_DnsRecordType as DnsRecordType, type network_DnsResponse as DnsResponse, type network_EmailHeaderAnalysis as EmailHeaderAnalysis, type network_EmailHeaderField as EmailHeaderField, type network_GeoResult as GeoResult, network_HTTP_HEADERS as HTTP_HEADERS, type network_HarEntry as HarEntry, type network_HarParseResult as HarParseResult, type network_HarSummary as HarSummary, type network_HeaderCategory as HeaderCategory, type network_HttpHeader as HttpHeader, type network_Ipv6AddressType as Ipv6AddressType, type network_Ipv6ParseResult as Ipv6ParseResult, network_LINK_REL_VALUES as LINK_REL_VALUES, type network_LinkHeaderEntry as LinkHeaderEntry, type network_LinkHeaderEntryInput as LinkHeaderEntryInput, type network_LinkHeaderResult as LinkHeaderResult, type network_LinkRel as LinkRel, type network_ManifestIconInfo as ManifestIconInfo, type network_ManifestIssue as ManifestIssue, type network_ManifestValidationResult as ManifestValidationResult, type network_ParsedDnsResult as ParsedDnsResult, type network_ParsedGeoResult as ParsedGeoResult, network_REFERRER_POLICY_VALUES as REFERRER_POLICY_VALUES, type network_RangeEntry as RangeEntry, type network_RangeEntryInput as RangeEntryInput, type network_RangeHeaderResult as RangeHeaderResult, type network_ReceivedHop as ReceivedHop, type network_ReferrerPolicyEntry as ReferrerPolicyEntry, type network_ReferrerPolicyResult as ReferrerPolicyResult, type network_ReferrerPolicyValue as ReferrerPolicyValue, type network_RobotsGroup as RobotsGroup, type network_RobotsIssue as RobotsIssue, type network_RobotsRule as RobotsRule, type network_RobotsValidationResult as RobotsValidationResult, network_STATUS_CODES as STATUS_CODES, type network_SameSiteValue as SameSiteValue, type network_SitemapIndexEntry as SitemapIndexEntry, type network_SitemapIssue as SitemapIssue, type network_SitemapUrlEntry as SitemapUrlEntry, type network_SitemapValidationResult as SitemapValidationResult, type network_StatusCode as StatusCode, type network_UaDeviceType as UaDeviceType, type network_UserAgentInfo as UserAgentInfo, type network_VaryHeaderEntry as VaryHeaderEntry, type network_VaryHeaderResult as VaryHeaderResult, network_analyzeEmailHeaders as analyzeEmailHeaders, network_buildCacheControl as buildCacheControl, network_buildDnsQueryUrl as buildDnsQueryUrl, network_buildGeoUrl as buildGeoUrl, network_buildLinkHeader as buildLinkHeader, network_buildMapUrl as buildMapUrl, network_buildRangeHeader as buildRangeHeader, network_buildReferrerPolicy as buildReferrerPolicy, network_buildVaryHeader as buildVaryHeader, network_checkSetCookieHeader as checkSetCookieHeader, network_countryCodeToFlag as countryCodeToFlag, network_formatCoordinates as formatCoordinates, network_formatTtl as formatTtl, network_getByCategory as getByCategory, network_getHeader as getHeader, network_getHeadersByCategory as getHeadersByCategory, network_getStatusByCategory as getStatusByCategory, network_getStatusCode as getStatusCode, network_isClientError as isClientError, network_isServerError as isServerError, network_isSuccess as isSuccess, network_isValidIp as isValidIp, network_isValidIpv4 as isValidIpv4, network_isValidIpv6 as isValidIpv6, network_parseContentRangeHeader as parseContentRangeHeader, network_parseDnsResponse as parseDnsResponse, network_parseGeoResponse as parseGeoResponse, network_parseHar as parseHar, network_parseIpv6Address as parseIpv6Address, network_parseUserAgent as parseUserAgent, network_parseVaryHeader as parseVaryHeader, network_searchHeaders as searchHeaders, network_searchStatusCodes as searchStatusCodes, network_statusCodeToText as statusCodeToText, network_typeNumberToLabel as typeNumberToLabel, network_validateDomain as validateDomain, network_validateHeaderName as validateHeaderName, network_validateHeaderValue as validateHeaderValue, network_validateManifest as validateManifest, network_validateRobotsTxt as validateRobotsTxt, network_validateSitemap as validateSitemap };
759
+ export { type network_AuthResultEntry as AuthResultEntry, type network_BuildRangeHeaderOptions as BuildRangeHeaderOptions, network_CLIENT_HINTS as CLIENT_HINTS, type network_CacheControlDirective as CacheControlDirective, type network_CacheControlOptions as CacheControlOptions, type network_CacheControlResult as CacheControlResult, type network_ClientHintDef as ClientHintDef, type network_ClientHintValueType as ClientHintValueType, type network_ClientHintsBuildResult as ClientHintsBuildResult, type network_ClientHintsParseResult as ClientHintsParseResult, type network_ContentRangeResult as ContentRangeResult, type network_CookieAttributes as CookieAttributes, type network_CookieCheckResult as CookieCheckResult, network_DNS_RECORD_TYPES as DNS_RECORD_TYPES, type network_DnsRecord as DnsRecord, type network_DnsRecordType as DnsRecordType, type network_DnsResponse as DnsResponse, type network_EmailHeaderAnalysis as EmailHeaderAnalysis, type network_EmailHeaderField as EmailHeaderField, type network_GeoResult as GeoResult, network_HTTP_HEADERS as HTTP_HEADERS, type network_HarEntry as HarEntry, type network_HarParseResult as HarParseResult, type network_HarSummary as HarSummary, type network_HeaderCategory as HeaderCategory, type network_HttpHeader as HttpHeader, type network_Ipv6AddressType as Ipv6AddressType, type network_Ipv6ParseResult as Ipv6ParseResult, network_LINK_REL_VALUES as LINK_REL_VALUES, type network_LinkHeaderEntry as LinkHeaderEntry, type network_LinkHeaderEntryInput as LinkHeaderEntryInput, type network_LinkHeaderResult as LinkHeaderResult, type network_LinkRel as LinkRel, type network_ManifestIconInfo as ManifestIconInfo, type network_ManifestIssue as ManifestIssue, type network_ManifestValidationResult as ManifestValidationResult, network_PERMISSIONS_POLICY_FEATURES as PERMISSIONS_POLICY_FEATURES, type network_ParsedClientHint as ParsedClientHint, type network_ParsedDnsResult as ParsedDnsResult, type network_ParsedGeoResult as ParsedGeoResult, type network_PermissionsPolicyDirective as PermissionsPolicyDirective, type network_PermissionsPolicyFeatureInput as PermissionsPolicyFeatureInput, type network_PermissionsPolicyResult as PermissionsPolicyResult, network_REFERRER_POLICY_VALUES as REFERRER_POLICY_VALUES, type network_RangeEntry as RangeEntry, type network_RangeEntryInput as RangeEntryInput, type network_RangeHeaderResult as RangeHeaderResult, type network_ReceivedHop as ReceivedHop, type network_ReferrerPolicyEntry as ReferrerPolicyEntry, type network_ReferrerPolicyResult as ReferrerPolicyResult, type network_ReferrerPolicyValue as ReferrerPolicyValue, type network_RobotsGroup as RobotsGroup, type network_RobotsIssue as RobotsIssue, type network_RobotsRule as RobotsRule, type network_RobotsValidationResult as RobotsValidationResult, network_STATUS_CODES as STATUS_CODES, type network_SameSiteValue as SameSiteValue, type network_SitemapIndexEntry as SitemapIndexEntry, type network_SitemapIssue as SitemapIssue, type network_SitemapUrlEntry as SitemapUrlEntry, type network_SitemapValidationResult as SitemapValidationResult, type network_StatusCode as StatusCode, type network_UaDeviceType as UaDeviceType, type network_UserAgentInfo as UserAgentInfo, type network_VaryHeaderEntry as VaryHeaderEntry, type network_VaryHeaderResult as VaryHeaderResult, network_analyzeEmailHeaders as analyzeEmailHeaders, network_buildCacheControl as buildCacheControl, network_buildClientHints as buildClientHints, network_buildDnsQueryUrl as buildDnsQueryUrl, network_buildGeoUrl as buildGeoUrl, network_buildLinkHeader as buildLinkHeader, network_buildMapUrl as buildMapUrl, network_buildPermissionsPolicy as buildPermissionsPolicy, network_buildRangeHeader as buildRangeHeader, network_buildReferrerPolicy as buildReferrerPolicy, network_buildVaryHeader as buildVaryHeader, network_checkSetCookieHeader as checkSetCookieHeader, network_countryCodeToFlag as countryCodeToFlag, network_formatCoordinates as formatCoordinates, network_formatTtl as formatTtl, network_getByCategory as getByCategory, network_getHeader as getHeader, network_getHeadersByCategory as getHeadersByCategory, network_getStatusByCategory as getStatusByCategory, network_getStatusCode as getStatusCode, network_isClientError as isClientError, network_isServerError as isServerError, network_isSuccess as isSuccess, network_isValidIp as isValidIp, network_isValidIpv4 as isValidIpv4, network_isValidIpv6 as isValidIpv6, network_parseClientHintHeaders as parseClientHintHeaders, network_parseContentRangeHeader as parseContentRangeHeader, network_parseDnsResponse as parseDnsResponse, network_parseGeoResponse as parseGeoResponse, network_parseHar as parseHar, network_parseIpv6Address as parseIpv6Address, network_parsePermissionsPolicy as parsePermissionsPolicy, network_parseUserAgent as parseUserAgent, network_parseVaryHeader as parseVaryHeader, network_searchHeaders as searchHeaders, network_searchStatusCodes as searchStatusCodes, network_statusCodeToText as statusCodeToText, network_typeNumberToLabel as typeNumberToLabel, network_validateDomain as validateDomain, network_validateHeaderName as validateHeaderName, network_validateHeaderValue as validateHeaderValue, network_validateManifest as validateManifest, network_validateRobotsTxt as validateRobotsTxt, network_validateSitemap as validateSitemap };
661
760
  }
662
761
 
663
- export { type UaDeviceType as $, type AuthResultEntry as A, type BuildRangeHeaderOptions as B, type CacheControlDirective as C, DNS_RECORD_TYPES as D, type EmailHeaderAnalysis as E, type ReceivedHop as F, type GeoResult as G, HTTP_HEADERS as H, type Ipv6AddressType as I, type ReferrerPolicyEntry as J, type ReferrerPolicyResult as K, LINK_REL_VALUES as L, type ManifestIconInfo as M, type ReferrerPolicyValue as N, type RobotsGroup as O, type ParsedDnsResult as P, type RobotsIssue as Q, REFERRER_POLICY_VALUES as R, type RobotsRule as S, type RobotsValidationResult as T, STATUS_CODES as U, type SameSiteValue as V, type SitemapIndexEntry as W, type SitemapIssue as X, type SitemapUrlEntry as Y, type SitemapValidationResult as Z, type StatusCode as _, type CacheControlOptions as a, type UserAgentInfo as a0, type VaryHeaderEntry as a1, type VaryHeaderResult as a2, analyzeEmailHeaders as a3, buildCacheControl as a4, buildDnsQueryUrl as a5, buildGeoUrl as a6, buildLinkHeader as a7, buildMapUrl as a8, buildRangeHeader as a9, statusCodeToText as aA, typeNumberToLabel as aB, validateDomain as aC, validateHeaderName as aD, validateHeaderValue as aE, validateManifest as aF, validateRobotsTxt as aG, validateSitemap as aH, buildReferrerPolicy as aa, buildVaryHeader as ab, checkSetCookieHeader as ac, countryCodeToFlag as ad, formatCoordinates as ae, formatTtl as af, getByCategory as ag, getHeader as ah, getHeadersByCategory as ai, getStatusByCategory as aj, getStatusCode as ak, isClientError as al, isServerError as am, isSuccess as an, isValidIp as ao, isValidIpv4 as ap, isValidIpv6 as aq, parseContentRangeHeader as ar, parseDnsResponse as as, parseGeoResponse as at, parseHar as au, parseIpv6Address as av, parseUserAgent as aw, parseVaryHeader as ax, searchHeaders as ay, searchStatusCodes as az, type CacheControlResult as b, type ContentRangeResult as c, type CookieAttributes as d, type CookieCheckResult as e, type DnsRecord as f, type DnsRecordType as g, type DnsResponse as h, type EmailHeaderField as i, type HarEntry as j, type HarParseResult as k, type HarSummary as l, type HeaderCategory as m, network as n, type HttpHeader as o, type Ipv6ParseResult as p, type LinkHeaderEntry as q, type LinkHeaderEntryInput as r, type LinkHeaderResult as s, type LinkRel as t, type ManifestIssue as u, type ManifestValidationResult as v, type ParsedGeoResult as w, type RangeEntry as x, type RangeEntryInput as y, type RangeHeaderResult as z };
762
+ export { type RobotsIssue as $, type AuthResultEntry as A, type BuildRangeHeaderOptions as B, CLIENT_HINTS as C, DNS_RECORD_TYPES as D, type EmailHeaderAnalysis as E, type ManifestValidationResult as F, type GeoResult as G, HTTP_HEADERS as H, type Ipv6AddressType as I, type ParsedClientHint as J, type ParsedDnsResult as K, LINK_REL_VALUES as L, type ManifestIconInfo as M, type ParsedGeoResult as N, type PermissionsPolicyDirective as O, PERMISSIONS_POLICY_FEATURES as P, type PermissionsPolicyFeatureInput as Q, type PermissionsPolicyResult as R, REFERRER_POLICY_VALUES as S, type RangeEntry as T, type RangeEntryInput as U, type RangeHeaderResult as V, type ReceivedHop as W, type ReferrerPolicyEntry as X, type ReferrerPolicyResult as Y, type ReferrerPolicyValue as Z, type RobotsGroup as _, type CacheControlDirective as a, type RobotsRule as a0, type RobotsValidationResult as a1, STATUS_CODES as a2, type SameSiteValue as a3, type SitemapIndexEntry as a4, type SitemapIssue as a5, type SitemapUrlEntry as a6, type SitemapValidationResult as a7, type StatusCode as a8, type UaDeviceType as a9, isValidIp as aA, isValidIpv4 as aB, isValidIpv6 as aC, parseClientHintHeaders as aD, parseContentRangeHeader as aE, parseDnsResponse as aF, parseGeoResponse as aG, parseHar as aH, parseIpv6Address as aI, parsePermissionsPolicy as aJ, parseUserAgent as aK, parseVaryHeader as aL, searchHeaders as aM, searchStatusCodes as aN, statusCodeToText as aO, typeNumberToLabel as aP, validateDomain as aQ, validateHeaderName as aR, validateHeaderValue as aS, validateManifest as aT, validateRobotsTxt as aU, validateSitemap as aV, type UserAgentInfo as aa, type VaryHeaderEntry as ab, type VaryHeaderResult as ac, analyzeEmailHeaders as ad, buildCacheControl as ae, buildClientHints as af, buildDnsQueryUrl as ag, buildGeoUrl as ah, buildLinkHeader as ai, buildMapUrl as aj, buildPermissionsPolicy as ak, buildRangeHeader as al, buildReferrerPolicy as am, buildVaryHeader as an, checkSetCookieHeader as ao, countryCodeToFlag as ap, formatCoordinates as aq, formatTtl as ar, getByCategory as as, getHeader as at, getHeadersByCategory as au, getStatusByCategory as av, getStatusCode as aw, isClientError as ax, isServerError as ay, isSuccess as az, type CacheControlOptions as b, type CacheControlResult as c, type ClientHintDef as d, type ClientHintValueType as e, type ClientHintsBuildResult as f, type ClientHintsParseResult as g, type ContentRangeResult as h, type CookieAttributes as i, type CookieCheckResult as j, type DnsRecord as k, type DnsRecordType as l, type DnsResponse as m, network as n, type EmailHeaderField as o, type HarEntry as p, type HarParseResult as q, type HarSummary as r, type HeaderCategory as s, type HttpHeader as t, type Ipv6ParseResult as u, type LinkHeaderEntry as v, type LinkHeaderEntryInput as w, type LinkHeaderResult as x, type LinkRel as y, type ManifestIssue as z };