Surge_by_SukkaW/Dist/chunks/loose-tldts-opt.DLUpGXpj.cjs
SukkaW d354c5e988
Some checks are pending
Build / Build (push) Waiting to run
Build / Diff output (push) Blocked by required conditions
Build / Deploy to Cloudflare Pages (push) Blocked by required conditions
Build / Deploy to GitHub and GitLab (push) Blocked by required conditions
Chore: maintainance
2025-02-07 17:52:36 +08:00

47 lines
1.4 KiB
JavaScript

'use strict';var looseTldtsOpt = {};var hasRequiredLooseTldtsOpt;
function requireLooseTldtsOpt () {
if (hasRequiredLooseTldtsOpt) return looseTldtsOpt;
hasRequiredLooseTldtsOpt = 1;
(function (exports) {
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
loosTldOptWithPrivateDomains: function() {
return loosTldOptWithPrivateDomains;
},
looseTldtsOpt: function() {
return looseTldtsOpt;
},
normalizeTldtsOpt: function() {
return normalizeTldtsOpt;
}
});
const looseTldtsOpt = {
allowPrivateDomains: false,
extractHostname: false,
validateHostname: false,
detectIp: false,
mixedInputs: false
};
const loosTldOptWithPrivateDomains = {
...looseTldtsOpt,
allowPrivateDomains: true
};
const normalizeTldtsOpt = {
allowPrivateDomains: true,
// in normalizeDomain, we only care if it contains IP, we don't care if we need to extract it
// by setting detectIp to false and manually check ip outside tldts.parse, we can skip the tldts
// inner "extractHostname" call
detectIp: false
};
} (looseTldtsOpt));
return looseTldtsOpt;
}exports.r=requireLooseTldtsOpt;