@humain/humain-code 0.4.17 → 0.4.18
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/CHANGELOG.md +13 -1
- package/dist/bundle/chunks/{chunk-W2QRCQBX.js → chunk-26EAEXO5.js} +18 -16
- package/dist/bundle/chunks/{chunk-65U7MPF4.js → chunk-2ZFUMXOZ.js} +11 -11
- package/dist/bundle/chunks/{chunk-AOL6QG6L.js → chunk-3UXBFT4Q.js} +64 -64
- package/dist/bundle/chunks/{chunk-PTP2ZHFQ.js → chunk-3XDL5ZE4.js} +1 -1
- package/dist/bundle/chunks/{chunk-DUSJT2W4.js → chunk-7VY5IL74.js} +1 -1
- package/dist/bundle/chunks/{chunk-X6OTEVGA.js → chunk-G6ABHCPB.js} +45 -30
- package/dist/bundle/chunks/{chunk-FHVNUUBF.js → chunk-HPSQKIWK.js} +1 -1
- package/dist/bundle/chunks/{chunk-36Q5UVQL.js → chunk-L5OUCJ7N.js} +9 -9
- package/dist/bundle/chunks/{chunk-LG2PJ6JN.js → chunk-NSMMDV3N.js} +2 -2
- package/dist/bundle/chunks/{chunk-ZRGFX6T6.js → chunk-OWLBGSXY.js} +2 -2
- package/dist/bundle/chunks/{chunk-4NFYTS4C.js → chunk-P4UKLIQB.js} +3 -3
- package/dist/bundle/chunks/{chunk-DNGJMRJW.js → chunk-SCIGZFN5.js} +11 -11
- package/dist/bundle/chunks/chunk-YLYOJQQX.js +1951 -0
- package/dist/bundle/chunks/{chunk-TJG52LZB.js → chunk-YMBXWW36.js} +1 -1
- package/dist/bundle/chunks/{cli-SRI4UOSL.js → cli-2NKM2RNJ.js} +1 -1
- package/dist/bundle/chunks/{compat-ARQPWKBQ.js → compat-VDGEZSVM.js} +1 -1
- package/dist/bundle/chunks/{dist-D7M52E3X.js → dist-ZJIYY3GA.js} +3 -3
- package/dist/bundle/chunks/{easter-egg-3d-4SUPLBUF.js → easter-egg-3d-VGJ77XZQ.js} +1 -1
- package/dist/bundle/chunks/es-N6YFJOD7.js +1901 -0
- package/dist/bundle/chunks/{esm-NCUV2DF7.js → esm-GIR7QH65.js} +1 -1
- package/dist/bundle/chunks/{execute-NTO3U76E.js → execute-ZBEZNJ4E.js} +1 -1
- package/dist/bundle/chunks/{extract-BKBHK4AK.js → extract-RFWEHH6W.js} +3 -3
- package/dist/bundle/chunks/{google-generative-ai-SJ4JO2MY.js → google-generative-ai-4OVYRP24.js} +1 -1
- package/dist/bundle/chunks/{google-vertex-KNLNNDET.js → google-vertex-3WQAZJQD.js} +1 -1
- package/dist/bundle/chunks/{node-ELWNZC34.js → node-A6SZ3T7E.js} +185 -185
- package/dist/bundle/chunks/{runtime-VGSK3QCM.js → runtime-HJEUOD4R.js} +1 -1
- package/dist/bundle/chunks/{undici-N4LWJ3S3.js → undici-4BK3MVJV.js} +1 -1
- package/dist/bundle/chunks/{virtual-modules-LP2ULVLW.js → virtual-modules-CFJTDIXL.js} +2 -2
- package/dist/bundle/cli-runtime.js +2 -2
- package/dist/bundle/flow/package.json +1 -1
- package/dist/bundle/index.js +5 -5
- package/dist/bundle/rpc-entry.js +2 -2
- package/npm-shrinkwrap.json +6 -6
- package/package.json +2 -2
- package/dist/bundle/chunks/chunk-4XU7TDAL.js +0 -1954
- package/dist/bundle/chunks/es-YEFEOGR3.js +0 -1905
- /package/dist/bundle/chunks/{chunk-XQRYOCHA.js → chunk-WZMA7HAJ.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- The owner granted a one-time Flow eval release-gate waiver for the 0.4.18 install-integrity repair (2026-10-23). No passing Flow gate is claimed. All other checks, tests, Node/Bun smoke tests and post-publication public-registry install and real-prompt checks remain required.
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Corrected the contracts integrity in CLI and contracts 0.4.18 distribution locks. Local publication validates both exact tarballs against the CLI shrinkwrap and standalone installer lock before publishing either, without repacking. The distribution-entrypoint test follows the contracts manifest version instead of retaining a stale release number ([#65](https://gitlab.humain.com/humain/data-and-ai-modeling/standard/agentic/humain-terminal/-/issues/65)).
|
|
12
|
+
|
|
5
13
|
## 0.4.17 publication addendum - 2026-10-23
|
|
6
14
|
|
|
7
15
|
### Changed
|
|
@@ -10,11 +18,15 @@
|
|
|
10
18
|
|
|
11
19
|
### Fixed
|
|
12
20
|
|
|
13
|
-
-
|
|
21
|
+
- Included the Pi 1.3.0 OAuth compatibility fix and SDK/CLI consumer checks for [#65](https://gitlab.humain.com/humain/data-and-ai-modeling/standard/agentic/humain-terminal/-/issues/65). Local tarball consumer checks passed, but post-publication registry installation remains blocked by the contracts integrity mismatch below.
|
|
14
22
|
- Flow verification tolerates more than 64 sibling worktrees while retaining nested-root checks ([#60](https://gitlab.humain.com/humain/data-and-ai-modeling/standard/agentic/humain-terminal/-/issues/60)).
|
|
15
23
|
- Flow preserves bracketed paths such as `[id]` in changed-file claims and logs the reason for unsafe repair scope ([#61](https://gitlab.humain.com/humain/data-and-ai-modeling/standard/agentic/humain-terminal/-/issues/61)).
|
|
16
24
|
- Refreshed catalog-dependent test fixtures and stabilized release checks against the pinned model catalog.
|
|
17
25
|
|
|
26
|
+
### Known Issues
|
|
27
|
+
|
|
28
|
+
- Post-publication fresh npm installations fail with `EINTEGRITY`: the CLI shrinkwrap records a different contracts 0.4.17 integrity from the published tarball. The local consumer override hid this mismatch. Both packages are published, but 0.4.17 is not a qualified fresh-install release; #65 remains open. A new CLI version is required because published versions cannot be replaced. This warning was added after publication; the npm artifact's earlier addendum does not contain it.
|
|
29
|
+
|
|
18
30
|
## [0.4.17] - 2026-10-19
|
|
19
31
|
|
|
20
32
|
Version 0.4.16 was never published to npm and is superseded by 0.4.17. This release includes its configuration-fingerprint fixes and the `unsupported_configuration` failure/reason class. The historical 0.4.16 notes below are retained unchanged.
|
|
@@ -76,27 +76,29 @@ selectorIndex+1)===CharCode.Asterisk?(name="*",selectorIndex+=2):name=getName2(1
|
|
|
76
76
|
(function(CharCode2){CharCode2[CharCode2.LeftParenthesis=40]="LeftParenthesis",CharCode2[CharCode2.RightParenthesis=41]="RightParenthesis",CharCode2[CharCode2.LeftSquareBracket=91]="LeftSquareBracket",CharCode2[CharCode2.RightSquareBracket=93]="RightSquareBracket",CharCode2[CharCode2.Comma=44]="Comma",CharCode2[CharCode2.Period=46]="Period",CharCode2[CharCode2.Colon=58]="Colon",CharCode2[CharCode2.SingleQuote=39]="SingleQuote",CharCode2[CharCode2.DoubleQuote=34]="DoubleQuote",CharCode2[CharCode2.
|
|
77
77
|
Plus=43]="Plus",CharCode2[CharCode2.Tilde=126]="Tilde",CharCode2[CharCode2.QuestionMark=63]="QuestionMark",CharCode2[CharCode2.ExclamationMark=33]="ExclamationMark",CharCode2[CharCode2.Slash=47]="Slash",CharCode2[CharCode2.Equal=61]="Equal",CharCode2[CharCode2.Dollar=36]="Dollar",CharCode2[CharCode2.Pipe=124]="Pipe",CharCode2[CharCode2.Circumflex=94]="Circumflex",CharCode2[CharCode2.Asterisk=42]="Asterisk",CharCode2[CharCode2.GreaterThan=62]="GreaterThan",CharCode2[CharCode2.LessThan=60]="LessTh\
|
|
78
78
|
an",CharCode2[CharCode2.Hash=35]="Hash",CharCode2[CharCode2.LowerI=105]="LowerI",CharCode2[CharCode2.LowerS=115]="LowerS",CharCode2[CharCode2.BackSlash=92]="BackSlash",CharCode2[CharCode2.Space=32]="Space",CharCode2[CharCode2.Tab=9]="Tab",CharCode2[CharCode2.NewLine=10]="NewLine",CharCode2[CharCode2.FormFeed=12]="FormFeed",CharCode2[CharCode2.CarriageReturn=13]="CarriageReturn"})(CharCode||(CharCode={}));actionTypes=new Map([[CharCode.Tilde,AttributeAction.Element],[CharCode.Circumflex,AttributeAction.
|
|
79
|
-
Start],[CharCode.Dollar,AttributeAction.End],[CharCode.Asterisk,AttributeAction.Any],[CharCode.ExclamationMark,AttributeAction.Not],[CharCode.Pipe,AttributeAction.Hyphen]]),unpackPseudos=new Set(["has","not","matches","is","where","host","host-context"]),pseudosToPseudoElements=new Set(["before","after","first-line","first-letter"]);stripQuotesFromPseudos=new Set(["contains","icontains"])}});var init_dist2=__esm({"node_modules/css-what/dist/index.js"(){init_parse();init_types()}});function isTag(element){return element.type===ElementType.Tag||element.type===ElementType.Script||element.type===ElementType.Style}var ElementType,Root,Text,Directive,Comment,Script,Style,Tag,CDATA,Doctype,init_dist3=__esm({"node_modules/domelementtype/dist/index.js"(){(function(
|
|
80
|
-
CDATA="cdata",
|
|
79
|
+
Start],[CharCode.Dollar,AttributeAction.End],[CharCode.Asterisk,AttributeAction.Any],[CharCode.ExclamationMark,AttributeAction.Not],[CharCode.Pipe,AttributeAction.Hyphen]]),unpackPseudos=new Set(["has","not","matches","is","where","host","host-context"]),pseudosToPseudoElements=new Set(["before","after","first-line","first-letter"]);stripQuotesFromPseudos=new Set(["contains","icontains"])}});var init_dist2=__esm({"node_modules/css-what/dist/index.js"(){init_parse();init_types()}});function isTag(element){return element.type===ElementType.Tag||element.type===ElementType.Script||element.type===ElementType.Style}var ElementType,Root,Text,Directive,Comment,Script,Style,Tag,CDATA,Doctype,init_dist3=__esm({"node_modules/domhandler/node_modules/domelementtype/dist/index.js"(){(function(ElementType4){ElementType4.Root="root",ElementType4.Text="text",ElementType4.Directive="directive",ElementType4.Comment="comment",ElementType4.Script="script",ElementType4.Style="style",ElementType4.
|
|
80
|
+
Tag="tag",ElementType4.CDATA="cdata",ElementType4.Doctype="doctype"})(ElementType||(ElementType={}));Root=ElementType.Root,Text=ElementType.Text,Directive=ElementType.Directive,Comment=ElementType.Comment,Script=ElementType.Script,Style=ElementType.Style,Tag=ElementType.Tag,CDATA=ElementType.CDATA,Doctype=ElementType.Doctype}});function isTag2(node){return isTag(node)}function isCDATA(node){return node.type===ElementType.CDATA}function isText(node){return node.type===ElementType.Text}function isComment(node){return node.type===ElementType.Comment}function hasChildren(node){return Object.hasOwn(node,"children")}var init_node=__esm({"node_modules/domhandler/dist/node.js"(){init_dist3()}});var init_dist4=__esm({"node_modules/domhandler/dist/index.js"(){init_node()}});function filter(test,node,recurse=!0,limit=Number.POSITIVE_INFINITY){return find(test,Array.isArray(node)?node:[node],recurse,limit)}function find(test,nodes,recurse,limit){let result=[],nodeStack=[Array.isArray(nodes)?nodes:[nodes]],indexStack=[0];for(;;){if(indexStack[0]>=nodeStack[0].length){if(indexStack.length===1)return result;nodeStack.shift(),indexStack.shift();continue}let element=nodeStack[0][indexStack[0]++];if(test(element)&&(result.push(element),--limit<=0))return result;recurse&&hasChildren(
|
|
81
81
|
element)&&element.children.length>0&&(indexStack.unshift(0),nodeStack.unshift(element.children))}}function findOne(test,nodes,recurse=!0){let searchedNodes=Array.isArray(nodes)?nodes:[nodes];for(let node of searchedNodes){if(isTag2(node)&&test(node))return node;if(recurse&&hasChildren(node)&&node.children.length>0){let found=findOne(test,node.children,!0);if(found)return found}}return null}function existsOne(test,nodes){return(Array.isArray(nodes)?nodes:[nodes]).some(node=>isTag2(node)&&test(node)||
|
|
82
82
|
hasChildren(node)&&existsOne(test,node.children))}function findAll(test,nodes){let result=[],nodeStack=[Array.isArray(nodes)?nodes:[nodes]],indexStack=[0];for(;;){if(indexStack[0]>=nodeStack[0].length){if(nodeStack.length===1)return result;nodeStack.shift(),indexStack.shift();continue}let element=nodeStack[0][indexStack[0]++];isTag2(element)&&test(element)&&result.push(element),hasChildren(element)&&element.children.length>0&&(indexStack.unshift(0),nodeStack.unshift(element.children))}}var init_querying=__esm(
|
|
83
83
|
{"node_modules/domutils/dist/querying.js"(){init_dist4()}});function getAttribCheck(attrib,value){return typeof value=="function"?element=>isTag2(element)&&value(element.attribs[attrib]):element=>isTag2(element)&&element.attribs[attrib]===value}function combineFuncs(a,b){return element=>a(element)||b(element)}function compileTest(options){let funcs=Object.keys(options).map(key=>{let value=options[key];return Object.hasOwn(Checks,key)?Checks[key](value):getAttribCheck(key,value)});return funcs.length===0?null:funcs.reduce(combineFuncs)}function testElement(options,node){
|
|
84
84
|
let test=compileTest(options);return test?test(node):!0}function getElements(options,nodes,recurse,limit=Number.POSITIVE_INFINITY){let test=compileTest(options);return test?filter(test,nodes,recurse,limit):[]}function getElementById(id,nodes,recurse=!0){return Array.isArray(nodes)||(nodes=[nodes]),findOne(getAttribCheck("id",id),nodes,recurse)}function getElementsByTagName(tagName,nodes,recurse=!0,limit=Number.POSITIVE_INFINITY){return filter(Checks.tag_name(tagName),nodes,recurse,limit)}function getElementsByClassName(className,nodes,recurse=!0,limit=Number.
|
|
85
85
|
POSITIVE_INFINITY){return filter(getAttribCheck("class",className),nodes,recurse,limit)}function getElementsByTagType(type,nodes,recurse=!0,limit=Number.POSITIVE_INFINITY){return filter(Checks.tag_type(type),nodes,recurse,limit)}var Checks,init_legacy=__esm({"node_modules/domutils/dist/legacy.js"(){init_dist4();init_querying();Checks={tag_name(name){return typeof name=="function"?element=>isTag2(element)&&name(element.name):name==="*"?isTag2:element=>isTag2(element)&&element.name===name},tag_type(type){
|
|
86
|
-
return typeof type=="function"?element=>type(element.type):element=>element.type===type},tag_contains(data){return typeof data=="function"?element=>isText(element)&&data(element.data):element=>isText(element)&&element.data===data}}}});
|
|
86
|
+
return typeof type=="function"?element=>type(element.type):element=>element.type===type},tag_contains(data){return typeof data=="function"?element=>isText(element)&&data(element.data):element=>isText(element)&&element.data===data}}}});var ElementType2,Root2,Text2,Directive2,Comment2,Script2,Style2,Tag2,CDATA2,Doctype2,init_dist5=__esm({"node_modules/dom-serializer/node_modules/domelementtype/dist/index.js"(){(function(ElementType4){ElementType4.Root="root",ElementType4.Text="text",ElementType4.Directive="directive",ElementType4.Comment="comment",ElementType4.Script="script",ElementType4.Style="style",ElementType4.Tag="tag",ElementType4.CDATA="cdata",ElementType4.Doctype="doctype"})(ElementType2||(ElementType2={}));Root2=ElementType2.
|
|
87
|
+
Root,Text2=ElementType2.Text,Directive2=ElementType2.Directive,Comment2=ElementType2.Comment,Script2=ElementType2.Script,Style2=ElementType2.Style,Tag2=ElementType2.Tag,CDATA2=ElementType2.CDATA,Doctype2=ElementType2.Doctype}});function getEscape(char){return char===34?""":char===38?"&":char===39?"'":char===60?"<":char===62?">":" "}function isXmlEscapable(code){return code>=128||code>=32&&code<64&&(XML_BITSET_VALUE>>>code&1)===1}function encodeXML(input){let{length}=input,out,last=0,index=0;for(;index<length;){let char=input.charCodeAt(index);if(!isXmlEscapable(char)){let bound=Math.min(index+32,length),next=index+1;for(;next<bound&&!isXmlEscapable(input.charCodeAt(next));)next++;if(next<bound){
|
|
87
88
|
index=next;continue}if(next>=length||(xmlEncodeRegex.lastIndex=next,!xmlEncodeRegex.test(input)))break;index=xmlEncodeRegex.lastIndex-1;continue}if(out===void 0?out=input.substring(0,index):last!==index&&(out+=input.substring(last,index)),char<64){out+=getEscape(char),last=index+=1;continue}let cp=input.codePointAt(index);out+=`&#x${cp.toString(16)};`,cp!==char&&index++,last=index+=1}return out===void 0?input:(last<length&&(out+=input.substr(last)),out)}function escapeWithRegex(re,data){if(re.lastIndex=
|
|
88
89
|
0,!re.test(data))return data;let out="",last=0;do{let index=re.lastIndex-1;last!==index&&(out+=data.substring(last,index));let char=data.charCodeAt(index);out+=getEscape(char),last=index+1}while(re.test(data));return out+data.substring(last)}function escapeAttribute(data){return escapeWithRegex(attributeEscapeRegex,data)}function escapeText(data){return escapeWithRegex(textEscapeRegex,data)}var XML_BITSET_VALUE,xmlEncodeRegex,attributeEscapeRegex,textEscapeRegex,init_escape=__esm({"node_modules/\
|
|
89
|
-
entities/dist/escape.js"(){XML_BITSET_VALUE=1342177476,xmlEncodeRegex=/["&'<>\u0080-\uFFFF]/g;attributeEscapeRegex=/["&\u{A0}]/gu;textEscapeRegex=/[&<>\u{A0}]/gu}});var EntityLevel,EncodingMode,
|
|
90
|
-
EncodingMode||(EncodingMode={}))}});var elementNames,attributeNames,init_foreign_names=__esm({"node_modules/dom-serializer/dist/foreign-names.js"(){elementNames=new Map("altGlyph altGlyphDef altGlyphItem animateColor animateMotion animateTransform clipPath feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feDropShadow feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotL\
|
|
90
|
+
dom-serializer/node_modules/entities/dist/escape.js"(){XML_BITSET_VALUE=1342177476,xmlEncodeRegex=/["&'<>\u0080-\uFFFF]/g;attributeEscapeRegex=/["&\u{A0}]/gu;textEscapeRegex=/[&<>\u{A0}]/gu}});var EntityLevel,EncodingMode,init_dist6=__esm({"node_modules/dom-serializer/node_modules/entities/dist/index.js"(){init_escape();(function(EntityLevel2){EntityLevel2[EntityLevel2.XML=0]="XML",EntityLevel2[EntityLevel2.HTML=1]="HTML"})(EntityLevel||(EntityLevel={}));(function(EncodingMode2){EncodingMode2[EncodingMode2.UTF8=0]="UTF8",EncodingMode2[EncodingMode2.ASCII=1]="ASCII",EncodingMode2[EncodingMode2.Extensive=2]="Extensive",EncodingMode2[EncodingMode2.Attribute=3]="Attribute",EncodingMode2[EncodingMode2.
|
|
91
|
+
Text=4]="Text"})(EncodingMode||(EncodingMode={}))}});var elementNames,attributeNames,init_foreign_names=__esm({"node_modules/dom-serializer/dist/foreign-names.js"(){elementNames=new Map("altGlyph altGlyphDef altGlyphItem animateColor animateMotion animateTransform clipPath feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feDropShadow feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotL\
|
|
91
92
|
ight feTile feTurbulence foreignObject glyphRef linearGradient radialGradient textPath".split(" ").map(name=>[name.toLowerCase(),name])),attributeNames=new Map("definitionURL attributeName attributeType baseFrequency baseProfile calcMode clipPathUnits diffuseConstant edgeMode filterUnits glyphRef gradientTransform gradientUnits kernelMatrix kernelUnitLength keyPoints keySplines keyTimes lengthAdjust limitingConeAngle markerHeight markerUnits markerWidth maskContentUnits maskUnits numOctaves path\
|
|
92
|
-
Length patternContentUnits patternTransform patternUnits pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits refX refY repeatCount repeatDur requiredExtensions requiredFeatures specularConstant specularExponent spreadMethod startOffset stdDeviation stitchTiles surfaceScale systemLanguage tableValues targetX targetY textLength viewBox viewTarget xChannelSelector yChannelSelector zoomAndPan".split(" ").map(name=>[name.toLowerCase(),name]))}});function render(node,options={}){let nodes="length"in node?node:[node],xmlMode=options.xmlMode??!1,output="";for(let index=0;index<nodes.length;index++)output+=renderNode(nodes[index],options,xmlMode);return output}function renderChildren(children,options,xmlMode){let output="";for(let index=0;index<children.length;index++)output+=renderNode(children[index],options,xmlMode);return output}function renderNode(node,options,xmlMode){switch(node.type){case
|
|
93
|
-
xmlMode);case
|
|
93
|
+
Length patternContentUnits patternTransform patternUnits pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits refX refY repeatCount repeatDur requiredExtensions requiredFeatures specularConstant specularExponent spreadMethod startOffset stdDeviation stitchTiles surfaceScale systemLanguage tableValues targetX targetY textLength viewBox viewTarget xChannelSelector yChannelSelector zoomAndPan".split(" ").map(name=>[name.toLowerCase(),name]))}});function render(node,options={}){let nodes="length"in node?node:[node],xmlMode=options.xmlMode??!1,output="";for(let index=0;index<nodes.length;index++)output+=renderNode(nodes[index],options,xmlMode);return output}function renderChildren(children,options,xmlMode){let output="";for(let index=0;index<children.length;index++)output+=renderNode(children[index],options,xmlMode);return output}function renderNode(node,options,xmlMode){switch(node.type){case Root2:return renderChildren(node.children,options,
|
|
94
|
+
xmlMode);case Directive2:return`<${node.data}>`;case Comment2:return`<!--${node.data}-->`;case CDATA2:return`<![CDATA[${node.children[0].data}]]>`;case Script2:case Style2:case Tag2:return renderTag(node,options,xmlMode);case Text2:{let element=node,data=element.data||"";return(options.encodeEntities??options.decodeEntities)!==!1&&!(!xmlMode&&element.parent&&unencodedElements.has(element.parent.name))?xmlMode||options.encodeEntities!=="utf8"?encodeXML(data):escapeText(data):data}}}function renderTag(element,options,xmlMode){
|
|
94
95
|
xmlMode==="foreign"&&(element.name=elementNames.get(element.name)??element.name,element.parent&&foreignModeIntegrationPoints.has(element.parent.name)&&(xmlMode=!1)),!xmlMode&&foreignElements.has(element.name)&&(xmlMode="foreign");let{name,children}=element,isVoid=!xmlMode&&voidElements.has(name),tag=`<${name}${formatAttributes(element.attribs,options,xmlMode)}`;return children.length===0&&(xmlMode?options.selfClosingTags!==!1:options.selfClosingTags&&isVoid)?tag+=xmlMode?"/>":" />":(tag+=">",children.
|
|
95
96
|
length>0&&(tag+=renderChildren(children,options,xmlMode)),isVoid||(tag+=`</${name}>`)),tag}function replaceQuotes(value){return value.replaceAll('"',""")}function formatAttributes(attributes,options,xmlMode){if(!attributes)return"";let encode=(options.encodeEntities??options.decodeEntities)===!1?replaceQuotes:xmlMode||options.encodeEntities!=="utf8"?encodeXML:escapeAttribute,isForeign=xmlMode==="foreign",showEmpty=!!(options.emptyAttrs??xmlMode),result="";for(let key in attributes){if(!Object.
|
|
96
|
-
hasOwn(attributes,key))continue;let value=attributes[key],k=isForeign?attributeNames.get(key)??key:key;result+=!showEmpty&&(value==null||value==="")?` ${k}`:` ${k}="${encode(value==null?"":String(value))}"`}return result}var unencodedElements,voidElements,foreignElements,foreignModeIntegrationPoints,dist_default,
|
|
97
|
-
xt noscript".split(" ")),voidElements=new Set("area base basefont br col command embed frame hr img input isindex keygen link meta param source track wbr".split(" ")),foreignElements=new Set(["svg","math"]),foreignModeIntegrationPoints=new Set("mi mo mn ms mtext annotation-xml foreignObject desc title".split(" "));dist_default=render}});
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
hasOwn(attributes,key))continue;let value=attributes[key],k=isForeign?attributeNames.get(key)??key:key;result+=!showEmpty&&(value==null||value==="")?` ${k}`:` ${k}="${encode(value==null?"":String(value))}"`}return result}var unencodedElements,voidElements,foreignElements,foreignModeIntegrationPoints,dist_default,init_dist7=__esm({"node_modules/dom-serializer/dist/index.js"(){init_dist5();init_dist6();init_foreign_names();unencodedElements=new Set("style script xmp iframe noembed noframes plainte\
|
|
98
|
+
xt noscript".split(" ")),voidElements=new Set("area base basefont br col command embed frame hr img input isindex keygen link meta param source track wbr".split(" ")),foreignElements=new Set(["svg","math"]),foreignModeIntegrationPoints=new Set("mi mo mn ms mtext annotation-xml foreignObject desc title".split(" "));dist_default=render}});var ElementType3,Root3,Text3,Directive3,Comment3,Script3,Style3,Tag3,CDATA3,Doctype3,init_dist8=__esm({"node_modules/domutils/node_modules/domelementtype/dist/index.js"(){(function(ElementType4){ElementType4.Root="root",ElementType4.Text="text",ElementType4.Directive="directive",ElementType4.Comment="comment",ElementType4.Script="script",ElementType4.Style="style",ElementType4.Tag="tag",ElementType4.CDATA="cdata",ElementType4.Doctype="doctype"})(ElementType3||(ElementType3={}));Root3=ElementType3.
|
|
99
|
+
Root,Text3=ElementType3.Text,Directive3=ElementType3.Directive,Comment3=ElementType3.Comment,Script3=ElementType3.Script,Style3=ElementType3.Style,Tag3=ElementType3.Tag,CDATA3=ElementType3.CDATA,Doctype3=ElementType3.Doctype}});function getOuterHTML(node,options){return dist_default(node,options)}function getInnerHTML(node,options){return hasChildren(node)?node.children.map(node2=>getOuterHTML(node2,options)).join(""):""}function getText(node){return Array.isArray(node)?node.map(getText).join(""):isTag2(node)?node.name==="br"?`
|
|
100
|
+
`:getText(node.children):isCDATA(node)?getText(node.children):isText(node)?node.data:""}function textContent(node){return Array.isArray(node)?node.map(textContent).join(""):hasChildren(node)&&!isComment(node)?textContent(node.children):isText(node)?node.data:""}function innerText(node){return Array.isArray(node)?node.map(innerText).join(""):hasChildren(node)&&(node.type===ElementType3.Tag||isCDATA(node))?innerText(node.children):isText(node)?node.data:""}var init_stringify=__esm({"node_modules/d\
|
|
101
|
+
omutils/dist/stringify.js"(){init_dist7();init_dist8();init_dist4()}});function getFeed(document){let feedRoot=getOneElement(isValidFeed,document);return feedRoot?feedRoot.name==="feed"?getAtomFeed(feedRoot):getRssFeed(feedRoot):null}function getAtomFeed(feedRoot){let childs=feedRoot.children,feed={type:"atom",items:getElementsByTagName("entry",childs).map(item=>{let{children}=item,entry={media:getMediaElements(children)};addConditionally(entry,"id","id",children),addConditionally(entry,"title","title",children);let href2=getOneElement("link",children)?.attribs.href;
|
|
100
102
|
href2&&(entry.link=href2);let description=fetch("summary",children)||fetch("content",children);description&&(entry.description=description);let pubDate=fetch("updated",children);return pubDate&&(entry.pubDate=new Date(pubDate)),entry})};addConditionally(feed,"id","id",childs),addConditionally(feed,"title","title",childs);let href=getOneElement("link",childs)?.attribs.href;href&&(feed.link=href),addConditionally(feed,"description","subtitle",childs);let updated=fetch("updated",childs);return updated&&
|
|
101
103
|
(feed.updated=new Date(updated)),addConditionally(feed,"author","email",childs,!0),feed}function getRssFeed(feedRoot){let childs=getOneElement("channel",feedRoot.children)?.children??[],feed={type:feedRoot.name.substr(0,3),id:"",items:getElementsByTagName("item",feedRoot.children).map(item=>{let{children}=item,entry={media:getMediaElements(children)};addConditionally(entry,"id","guid",children),addConditionally(entry,"title","title",children),addConditionally(entry,"link","link",children),addConditionally(
|
|
102
104
|
entry,"description","description",children);let pubDate=fetch("pubDate",children)||fetch("dc:date",children);return pubDate&&(entry.pubDate=new Date(pubDate)),entry})};addConditionally(feed,"title","title",childs),addConditionally(feed,"link","link",childs),addConditionally(feed,"description","description",childs);let updated=fetch("lastBuildDate",childs);return updated&&(feed.updated=new Date(updated)),addConditionally(feed,"author","managingEditor",childs,!0),feed}function getMediaElements(where){
|
|
@@ -111,7 +113,7 @@ removeElement(next);let{parent}=element,currentNext=element.next;if(next.next=cu
|
|
|
111
113
|
prev=child,child.next=sibling}}function prepend(element,previous){removeElement(previous);let{parent}=element;if(parent){let childs=parent.children;childs.splice(childs.indexOf(element),0,previous)}element.prev&&(element.prev.next=previous),previous.parent=parent,previous.prev=element.prev,previous.next=element,element.prev=previous}var init_manipulation=__esm({"node_modules/domutils/dist/manipulation.js"(){}});function getChildren(element){return hasChildren(element)?element.children:[]}function getParent(element){return element.parent||null}function getSiblings(element){let parent=getParent(element);if(parent!=null)return getChildren(parent);let siblings=[element],{prev,next}=element;for(;prev!=null;)siblings.unshift(prev),{prev}=prev;for(;next!=null;)siblings.push(next),{next}=next;return siblings}function getAttributeValue(element,name){let{attribs}=element;return attribs?.[name]}function hasAttrib(element,name){
|
|
112
114
|
let{attribs}=element;return attribs!=null&&Object.hasOwn(attribs,name)&&attribs[name]!=null}function getName(element){return element.name}function nextElementSibling(element){let{next}=element;for(;next!==null&&!isTag2(next);)({next}=next);return next}function prevElementSibling(element){let{prev}=element;for(;prev!==null&&!isTag2(prev);)({prev}=prev);return prev}var init_traversal=__esm({"node_modules/domutils/dist/traversal.js"(){init_dist4()}});var dist_exports2={};__export(dist_exports2,{DocumentPosition:()=>DocumentPosition,append:()=>append,appendChild:()=>appendChild,compareDocumentPosition:()=>compareDocumentPosition,existsOne:()=>existsOne,filter:()=>filter,find:()=>find,findAll:()=>findAll,findOne:()=>findOne,getAttributeValue:()=>getAttributeValue,getChildren:()=>getChildren,getElementById:()=>getElementById,getElements:()=>getElements,getElementsByClassName:()=>getElementsByClassName,getElementsByTagName:()=>getElementsByTagName,
|
|
113
115
|
getElementsByTagType:()=>getElementsByTagType,getFeed:()=>getFeed,getInnerHTML:()=>getInnerHTML,getName:()=>getName,getOuterHTML:()=>getOuterHTML,getParent:()=>getParent,getSiblings:()=>getSiblings,getText:()=>getText,hasAttrib:()=>hasAttrib,innerText:()=>innerText,nextElementSibling:()=>nextElementSibling,prepend:()=>prepend,prependChild:()=>prependChild,prevElementSibling:()=>prevElementSibling,removeElement:()=>removeElement,removeSubsets:()=>removeSubsets,replaceElement:()=>replaceElement,testElement:()=>testElement,
|
|
114
|
-
textContent:()=>textContent,uniqueSort:()=>uniqueSort});var
|
|
116
|
+
textContent:()=>textContent,uniqueSort:()=>uniqueSort});var init_dist9=__esm({"node_modules/domutils/dist/index.js"(){init_feeds();init_helpers();init_legacy();init_manipulation();init_querying();init_stringify();init_traversal()}});function escapeRegex(value){return value.replace(reChars,"\\$&")}function shouldIgnoreCase(selector,options){return typeof selector.ignoreCase=="boolean"?selector.ignoreCase:selector.ignoreCase==="quirks"?!!options.quirksMode:!options.xmlMode&&caseInsensitiveAttributes.has(selector.name)}var reChars,whitespaceRe,caseInsensitiveAttributes,attributeRules,init_attributes=__esm({"node_modules/css-select/dist/attributes.js"(){init_dist();reChars=/[-[\]{}()*+?.,\\^$|#\s]/g,whitespaceRe=/\s/;caseInsensitiveAttributes=
|
|
115
117
|
new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);attributeRules={equals(next,data,options){let{adapter}=options,
|
|
116
118
|
{name}=data,{value}=data;return shouldIgnoreCase(data,options)?(value=value.toLowerCase(),element=>{let attribute=adapter.getAttributeValue(element,name);return attribute!=null&&attribute.length===value.length&&attribute.toLowerCase()===value&&next(element)}):element=>adapter.getAttributeValue(element,name)===value&&next(element)},hyphen(next,data,options){let{adapter}=options,{name}=data,{value}=data,{length}=value;return shouldIgnoreCase(data,options)?(value=value.toLowerCase(),function(element){
|
|
117
119
|
let attribute=adapter.getAttributeValue(element,name);return attribute!=null&&(attribute.length===length||attribute.charAt(length)==="-")&&attribute.substr(0,length).toLowerCase()===value&&next(element)}):function(element){let attribute=adapter.getAttributeValue(element,name);return attribute!=null&&(attribute.length===length||attribute.charAt(length)==="-")&&attribute.substr(0,length)===value&&next(element)}},element(next,data,options){let{adapter}=options,{name,value}=data;if(whitespaceRe.test(
|
|
@@ -128,11 +130,11 @@ unshift(0))}}}}function getNextSiblings(element,adapter){let siblings=adapter.ge
|
|
|
128
130
|
)`,enabled:":is(button, input, select, textarea, optgroup, option, fieldset):not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], :selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])","read-only":`[readonly]:is(textarea, ${textControl})`,"read-write":`:not([readonly]):is(textarea, ${textControl})`,selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",
|
|
129
131
|
checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"}}});function compile(parsed){let a=parsed[0],b=parsed[1]-1;if(b<0&&a<=0)return falseFunc;if(a===-1)return index=>index<=b;if(a===0)return index=>index===b;if(a===1)return b<0?trueFunc:index=>index>=b;let absA=Math.abs(a),bModulo=(b%absA+absA)%absA;return a>1?index=>index>=b&&index%absA===bModulo:index=>index<=b&&index%absA===bModulo}var init_compile=__esm({"node_modules/nth-check/dist/compile.js"(){init_dist()}});function parse2(formula){switch(formula=formula.trim().toLowerCase(),formula){case"even":return[2,0];case"odd":return[2,1]}let index=0,a=0,sign=readSign(),number=readNumber();if(index<formula.length&&formula.charAt(index)==="n"&&(index++,a=sign*(number??1),skipWhitespace(),index<formula.length?(sign=readSign(),skipWhitespace(),number=readNumber()):sign=number=0),number===null||index<formula.length)throw new Error(`n-th rule couldn't be parsed ('${formula}')`);return[a,sign*number];function readSign(){
|
|
130
132
|
switch(formula.charAt(index)){case"-":return index++,-1;case"+":{index++;break}}return 1}function readNumber(){let start=index,value=0;for(;index<formula.length&&formula.charCodeAt(index)>=ZERO&&formula.charCodeAt(index)<=NINE;)value=value*10+(formula.charCodeAt(index)-ZERO),index++;return index===start?null:value}function skipWhitespace(){for(;index<formula.length&&whitespace.has(formula.charCodeAt(index));)index++}}var whitespace,ZERO,NINE,init_parse2=__esm({"node_modules/nth-check/dist/parse.\
|
|
131
|
-
js"(){whitespace=new Set([9,10,12,13,32]),ZERO=48,NINE=57}});function nthCheck(formula){return compile(parse2(formula))}var
|
|
133
|
+
js"(){whitespace=new Set([9,10,12,13,32]),ZERO=48,NINE=57}});function nthCheck(formula){return compile(parse2(formula))}var init_dist10=__esm({"node_modules/nth-check/dist/index.js"(){init_compile();init_parse2()}});function cacheParentResults(next,{adapter,cacheResults},matches){if(cacheResults===!1||typeof WeakMap>"u")return element=>next(element)&&matches(element);let resultCache=new WeakMap;function addResultToCache(element){let result=matches(element);return resultCache.set(element,result),result}return function(element){if(!next(element))return!1;if(resultCache.has(element))return resultCache.get(element)??!1;let node=element;do{let parent=getElementParent(node,adapter);if(parent===null)return addResultToCache(
|
|
132
134
|
element);node=parent}while(!resultCache.has(node));return resultCache.get(node)?addResultToCache(element):!1}}var init_cache=__esm({"node_modules/css-select/dist/helpers/cache.js"(){init_querying2()}});function copyOptions(options){let{context:_,rootFunc:__,...copied}=options;return copied}var init_options=__esm({"node_modules/css-select/dist/helpers/options.js"(){}});function extendedFilter(tag,range){if(range[0]!=="*"&&range[0]!==tag[0])return!1;let tagIndex=1;for(let rangeIndex=1;rangeIndex<range.length;rangeIndex++)if(range[rangeIndex]!=="*"){for(;tagIndex<tag.length&&tag[tagIndex]!==range[rangeIndex];)if(tag[tagIndex++].length<=1)return!1;if(tagIndex>=tag.length)return!1;tagIndex++}return!0}function compileNth(reverse,ofType){return function(next,rule,options,context,compileToken2){let{adapter,equals}=options,ofMatch=ofType?null:rule.match(nthOfRegex),nthCheck2=nthCheck(
|
|
133
135
|
ofMatch?ofMatch[1].trim():rule);if(nthCheck2===falseFunc)return falseFunc;let ofSelector=ofMatch&&compileToken2?compileToken2(parse(ofMatch[2].trim()),copyOptions(options),context):void 0;if(ofSelector===falseFunc)return falseFunc;if(nthCheck2===trueFunc&&!ofSelector)return element=>getElementParent(element,adapter)!==null&&next(element);let shouldCount=ofSelector?(_element,sibling)=>ofSelector(sibling):ofType?(element,sibling)=>adapter.getName(sibling)===adapter.getName(element):trueFunc;return reverse?
|
|
134
136
|
function(element){if(ofSelector&&!ofSelector(element))return!1;let siblings=adapter.getSiblings(element),pos=0;for(let index=siblings.length-1;index>=0;index--){let sibling=siblings[index];if(equals(element,sibling))break;adapter.isTag(sibling)&&shouldCount(element,sibling)&&pos++}return nthCheck2(pos)&&next(element)}:function(element){if(ofSelector&&!ofSelector(element))return!1;let siblings=adapter.getSiblings(element),pos=0;for(let sibling of siblings){if(equals(element,sibling))break;adapter.
|
|
135
|
-
isTag(sibling)&&shouldCount(element,sibling)&&pos++}return nthCheck2(pos)&&next(element)}}}function dynamicStatePseudo(name){return function(next,_rule,{adapter}){let filterFunction=adapter[name];return typeof filterFunction!="function"?falseFunc:function(element){return filterFunction(element)&&next(element)}}}var nthOfRegex,filters,init_filters=__esm({"node_modules/css-select/dist/pseudo-selectors/filters.js"(){init_dist();init_dist2();
|
|
137
|
+
isTag(sibling)&&shouldCount(element,sibling)&&pos++}return nthCheck2(pos)&&next(element)}}}function dynamicStatePseudo(name){return function(next,_rule,{adapter}){let filterFunction=adapter[name];return typeof filterFunction!="function"?falseFunc:function(element){return filterFunction(element)&&next(element)}}}var nthOfRegex,filters,init_filters=__esm({"node_modules/css-select/dist/pseudo-selectors/filters.js"(){init_dist();init_dist2();init_dist10();init_cache();init_options();init_querying2();
|
|
136
138
|
nthOfRegex=/^(.+?)\s+of\s+(.+)$/is;filters={contains(next,text,options){let{getText:getText2}=options.adapter;return cacheParentResults(next,options,element=>getText2(element).includes(text))},icontains(next,text,options){let itext=text.toLowerCase(),{getText:getText2}=options.adapter;return cacheParentResults(next,options,element=>getText2(element).toLowerCase().includes(itext))},"nth-child":compileNth(!1,!1),"nth-last-child":compileNth(!0,!1),"nth-of-type":compileNth(!1,!0),"nth-last-of-type":compileNth(
|
|
137
139
|
!0,!0),root(next,_rule,{adapter}){return element=>getElementParent(element,adapter)===null&&next(element)},scope(next,rule,options,context){let{equals}=options;return!context||context.length===0?filters.root(next,rule,options):context.length===1?element=>equals(context[0],element)&&next(element):element=>context.includes(element)&&next(element)},lang(next,code,{adapter}){let ranges=code.split(",").map(r=>r.trim()).filter(r=>r.length>0).map(r=>r.replace(/^['"]|['"]$/g,"").toLowerCase().split("-"));
|
|
138
140
|
return function(element){let node=element;for(;node!=null;){let value=adapter.getAttributeValue(node,"xml:lang")??adapter.getAttributeValue(node,"lang");if(value!=null){if(!value)return ranges.some(r=>r[0]==="")&&next(element);let tag=value.toLowerCase().split("-");return ranges.some(r=>extendedFilter(tag,r))&&next(element)}let parent=adapter.getParent(node);node=parent!=null&&adapter.isTag(parent)?parent:null}return ranges.some(r=>r[0]==="")&&next(element)}},hover:dynamicStatePseudo("isHovered"),
|
|
@@ -161,5 +163,5 @@ if(next===rootFunction)return rootFunction;query=query===falseFunc?next:or(query
|
|
|
161
163
|
_flexibleDescendant"},SCOPE_TOKEN={type:SelectorType.Pseudo,name:"scope",data:null}}});var dist_exports4={};__export(dist_exports4,{_compileUnsafe:()=>_compileUnsafe,compile:()=>compile2,default:()=>dist_default2,is:()=>is2,prepareContext:()=>prepareContext,selectAll:()=>selectAll,selectOne:()=>selectOne});function convertOptionFormats(options){let finalOptions=options??defaultOptions;return finalOptions.adapter??=defaultOptions.adapter,finalOptions.equals??=finalOptions.adapter?.equals??defaultEquals,finalOptions}function compile2(selector,options,context){let convertedOptions=convertOptionFormats(
|
|
162
164
|
options),next=_compileUnsafe(selector,convertedOptions,context);return next===falseFunc?falseFunc:element=>convertedOptions.adapter.isTag(element)&&next(element)}function _compileUnsafe(selector,options,context){return compileToken(typeof selector=="string"?parse(selector):selector,convertOptionFormats(options),context)}function getSelectorFunction(searchFunction){return function(query,elements,options){let convertedOptions=convertOptionFormats(options);typeof query!="function"&&(query=_compileUnsafe(
|
|
163
165
|
query,convertedOptions,elements));let filteredElements=prepareContext(elements,convertedOptions.adapter,query.shouldTestNextSiblings);return searchFunction(query,filteredElements,convertedOptions)}}function prepareContext(elements,adapter,shouldTestNextSiblings=!1){return shouldTestNextSiblings&&(elements=appendNextSiblings(elements,adapter)),Array.isArray(elements)?adapter.removeSubsets(elements):adapter.getChildren(elements)}function appendNextSiblings(element,adapter){let elements=Array.isArray(
|
|
164
|
-
element)?[...element]:[element],elementsLength=elements.length;for(let index=0;index<elementsLength;index++){let nextSiblings=getNextSiblings(elements[index],adapter);elements.push(...nextSiblings)}return elements}function is2(element,query,options){return(typeof query=="function"?query:compile2(query,options))(element)}var defaultEquals,defaultOptions,selectAll,selectOne,dist_default2,
|
|
165
|
-
init_compile2();init_querying2();defaultEquals=(a,b)=>a===b,defaultOptions={adapter:{...dist_exports2,isTag:isTag2},equals:defaultEquals};selectAll=getSelectorFunction((query,elements,options)=>query===falseFunc||!elements||elements.length===0?[]:findAll2(query,elements,options)),selectOne=getSelectorFunction((query,elements,options)=>query===falseFunc||!elements||elements.length===0?null:findOne2(query,elements,options));dist_default2=selectAll}});export{compile2 as compile,is2 as is,dist_exports4 as dist_exports,
|
|
166
|
+
element)?[...element]:[element],elementsLength=elements.length;for(let index=0;index<elementsLength;index++){let nextSiblings=getNextSiblings(elements[index],adapter);elements.push(...nextSiblings)}return elements}function is2(element,query,options){return(typeof query=="function"?query:compile2(query,options))(element)}var defaultEquals,defaultOptions,selectAll,selectOne,dist_default2,init_dist11=__esm({"node_modules/css-select/dist/index.js"(){init_dist();init_dist2();init_dist4();init_dist9();
|
|
167
|
+
init_compile2();init_querying2();defaultEquals=(a,b)=>a===b,defaultOptions={adapter:{...dist_exports2,isTag:isTag2},equals:defaultEquals};selectAll=getSelectorFunction((query,elements,options)=>query===falseFunc||!elements||elements.length===0?[]:findAll2(query,elements,options)),selectOne=getSelectorFunction((query,elements,options)=>query===falseFunc||!elements||elements.length===0?null:findOne2(query,elements,options));dist_default2=selectAll}});export{compile2 as compile,is2 as is,dist_exports4 as dist_exports,init_dist11 as init_dist,require_lib,require_canvas};
|
|
@@ -15,7 +15,7 @@ registerBuiltInImagesApiProviders:()=>registerBuiltInImagesApiProviders,register
|
|
|
15
15
|
setBedrockProviderModule:()=>setBedrockProviderModule,stream:()=>stream,streamAnthropic:()=>streamAnthropic,streamAzureOpenAIResponses:()=>streamAzureOpenAIResponses,streamGoogle:()=>streamGoogle,streamGoogleVertex:()=>streamGoogleVertex,streamMistral:()=>streamMistral,streamOpenAICodexResponses:()=>streamOpenAICodexResponses,streamOpenAICompletions:()=>streamOpenAICompletions,streamOpenAIResponses:()=>streamOpenAIResponses,streamSimple:()=>streamSimple,streamSimpleAnthropic:()=>streamSimpleAnthropic,
|
|
16
16
|
streamSimpleAzureOpenAIResponses:()=>streamSimpleAzureOpenAIResponses,streamSimpleGoogle:()=>streamSimpleGoogle,streamSimpleGoogleVertex:()=>streamSimpleGoogleVertex,streamSimpleMistral:()=>streamSimpleMistral,streamSimpleOpenAICodexResponses:()=>streamSimpleOpenAICodexResponses,streamSimpleOpenAICompletions:()=>streamSimpleOpenAICompletions,streamSimpleOpenAIResponses:()=>streamSimpleOpenAIResponses,toToolDeclaration:()=>toToolDeclaration,unregisterApiProviders:()=>unregisterApiProviders,uuidv7:()=>uuidv7,
|
|
17
17
|
validateToolArguments:()=>validateToolArguments,validateToolCall:()=>validateToolCall,withoutInitialSystemMessage:()=>withoutInitialSystemMessage});var anthropicMessagesApi=()=>lazyApi(()=>import("./anthropic-messages-TSNY5MWH.js"));var azureOpenAIResponsesApi=()=>lazyApi(()=>import("./azure-openai-responses-Z4DCXO2G.js"));var __rewriteRelativeImportExtension=function(path,preserveJsx){return typeof path=="string"&&/^\.\.?\//.test(path)?path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(m,tsx,d,ext,cm){return tsx?preserveJsx?".jsx":".js":d&&(!ext||!cm)?m:d+ext+"."+cm.toLowerCase()+"js"}):path},importNodeOnlyApi=specifier=>{let runtimeSpecifier=import.meta.url.endsWith(".js")?specifier.replace(/\.ts$/,".js"):specifier;return import(__rewriteRelativeImportExtension(runtimeSpecifier))},bedrockModuleOverride;
|
|
18
|
-
function setBedrockProviderModule(module){bedrockModuleOverride=module}var bedrockConverseStreamApi=()=>lazyApi(async()=>bedrockModuleOverride??await importNodeOnlyApi("./bedrock-converse-stream.ts"));var googleGenerativeAIApi=()=>lazyApi(()=>import("./google-generative-ai-
|
|
18
|
+
function setBedrockProviderModule(module){bedrockModuleOverride=module}var bedrockConverseStreamApi=()=>lazyApi(async()=>bedrockModuleOverride??await importNodeOnlyApi("./bedrock-converse-stream.ts"));var googleGenerativeAIApi=()=>lazyApi(()=>import("./google-generative-ai-4OVYRP24.js"));var googleVertexApi=()=>lazyApi(()=>import("./google-vertex-3WQAZJQD.js"));var mistralConversationsApi=()=>lazyApi(()=>import("./mistral-conversations-G3GN6CMT.js"));var openAICodexResponsesApi=()=>lazyApi(()=>import("./openai-codex-responses-FJFDAWHI.js"));var openAICompletionsApi=()=>lazyApi(()=>import("./openai-completions-IC7WRLTI.js"));var openAIResponsesApi=()=>lazyApi(()=>import("./openai-responses-XXCYDFSM.js"));var piMessagesApi=()=>lazyApi(()=>import("./pi-messages-SAOV3JNW.js"));var amazon_bedrock_default={"bedrock-converse-stream":{"chat:amazon.nova-2-lite-v1:0":{id:"amazon.nova-2-lite-v1:0",name:"Nova 2 Lite",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:.33,output:2.75,cacheRead:.0825,cacheWrite:.33},contextWindow:1e6,maxTokens:65535,inputLimits:{images:{maxPerMessage:20,resize:{maxWidth:2e3,maxHeight:2e3,maxBytes:4718592,jpegQuality:80}}},type:"chat"},
|
|
19
19
|
"chat:amazon.nova-lite-v1:0":{id:"amazon.nova-lite-v1:0",name:"Nova Lite",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.06,output:.24,cacheRead:.015,cacheWrite:.06},contextWindow:3e5,maxTokens:1e4,inputLimits:{images:{maxPerMessage:20,resize:{maxWidth:2e3,maxHeight:2e3,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:amazon.nova-micro-v1:0":{id:"amazon.nova-micro-v1:0",name:"\
|
|
20
20
|
Nova Micro",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.035,output:.14,cacheRead:.00875,cacheWrite:.035},contextWindow:128e3,maxTokens:1e4,type:"chat"},"chat:amazon.nova-pro-v1:0":{id:"amazon.nova-pro-v1:0",name:"Nova Pro",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.8,output:3.2,
|
|
21
21
|
cacheRead:.2,cacheWrite:.8},contextWindow:3e5,maxTokens:1e4,inputLimits:{images:{maxPerMessage:20,resize:{maxWidth:2e3,maxHeight:2e3,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:anthropic.claude-fable-5":{id:"anthropic.claude-fable-5",name:"Claude Fable 5",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,
|
|
@@ -826,7 +826,7 @@ low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},input:["text","im
|
|
|
826
826
|
cacheControlFormat:"anthropic",sendSessionAffinityHeaders:!0},inputLimits:{images:{resize:{maxWidth:2e3,maxHeight:2e3,maxBytes:4718592,jpegQuality:80}}}},"chat:~anthropic/claude-sonnet-latest":{type:"chat",id:"~anthropic/claude-sonnet-latest",name:"Anthropic: Claude Sonnet Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},input:["text","i\
|
|
827
827
|
mage"],cost:{input:2,output:10,cacheRead:.1,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",supportsStrictMode:!0,cacheControlFormat:"anthropic",sendSessionAffinityHeaders:!0},inputLimits:{images:{resize:{maxWidth:2e3,maxHeight:2e3,maxBytes:4718592,jpegQuality:80}}}},"chat:~deepseek/deepseek-flash-latest":{type:"chat",id:"~deepseek/deepseek-flash-latest",name:"DeepSeek: DeepSeek Flash Latest",api:"openai-completions",baseUrl:"https:/\
|
|
828
828
|
/openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:null,high:"high",xhigh:null,max:"max"},input:["text","image"],cost:{input:.07,output:.5,cacheRead:.008,cacheWrite:0},contextWindow:1048576,maxTokens:943718,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",supportsStrictMode:!0,sendSessionAffinityHeaders:!0},inputLimits:{images:{resize:{maxWidth:2e3,maxHeight:2e3,maxBytes:4718592,jpegQuality:80}}}},"chat:~deepseek/deeps\
|
|
829
|
-
eek-pro-latest":{type:"chat",id:"~deepseek/deepseek-pro-latest",name:"DeepSeek: DeepSeek Pro Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:null,high:"high",xhigh:null,max:"max"},input:["text"],cost:{input:.
|
|
829
|
+
eek-pro-latest":{type:"chat",id:"~deepseek/deepseek-pro-latest",name:"DeepSeek: DeepSeek Pro Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:null,high:"high",xhigh:null,max:"max"},input:["text"],cost:{input:.2565,output:8,cacheRead:.26,cacheWrite:0},contextWindow:1048576,maxTokens:393216,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",supportsStrictMode:!0,sendSessionAffinityHeaders:!0}},
|
|
830
830
|
"chat:~deepseek/deepseek-v4-flash-latest":{type:"chat",id:"~deepseek/deepseek-v4-flash-latest",name:"DeepSeek: DeepSeek V4 Flash Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:null,high:"high",xhigh:null,max:"max"},input:["text"],cost:{input:.0475,output:.1568,cacheRead:.028,cacheWrite:0},contextWindow:1048576,maxTokens:943718,compat:{supportsDeveloperRole:!1,thinkingFormat:"ope\
|
|
831
831
|
nrouter",supportsStrictMode:!0,sendSessionAffinityHeaders:!0,requiresReasoningContentOnAssistantMessages:!0}},"chat:~google/gemini-flash-latest":{type:"chat",id:"~google/gemini-flash-latest",name:"Google: Gemini Flash Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},input:["text","image"],cost:{input:.75,output:3.75,cacheRead:.075,cacheWrite:.041667},
|
|
832
832
|
contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",supportsStrictMode:!0,sendSessionAffinityHeaders:!0},inputLimits:{images:{resize:{maxWidth:2e3,maxHeight:2e3,maxBytes:4718592,jpegQuality:80}}}},"chat:~google/gemini-pro-latest":{type:"chat",id:"~google/gemini-pro-latest",name:"Google: Gemini Pro Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,thinkingLevelMap:{off:null,minimal:null,low:"lo\
|
|
@@ -896,10 +896,10 @@ contextWindow:1048575,maxTokens:943717,compat:{supportsDeveloperRole:!1,thinking
|
|
|
896
896
|
igh",xhigh:null,max:"max"},input:["text"],cost:{input:.44,output:1.32,cacheRead:.014,cacheWrite:0},contextWindow:1048576,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",supportsStrictMode:!0,sendSessionAffinityHeaders:!0,requiresReasoningContentOnAssistantMessages:!0}},"chat:deepseek/deepseek-v4-flash-vision-exp":{type:"chat",id:"deepseek/deepseek-v4-flash-vision-exp",name:"DeepSeek: DeepSeek V4 Flash Vision Exp",api:"openai-completions",baseUrl:"https://openrouter.\
|
|
897
897
|
ai/api/v1",provider:"openrouter",reasoning:!0,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:null,high:"high",xhigh:null,max:"max"},input:["text","image"],cost:{input:.2156,output:.6468,cacheRead:.00686,cacheWrite:0},contextWindow:1048576,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",supportsStrictMode:!0,sendSessionAffinityHeaders:!0,requiresReasoningContentOnAssistantMessages:!0},inputLimits:{images:{resize:{maxWidth:2e3,maxHeight:2e3,maxBytes:4718592,
|
|
898
898
|
jpegQuality:80}}}},"chat:deepseek/deepseek-v4-pro":{type:"chat",id:"deepseek/deepseek-v4-pro",name:"DeepSeek: DeepSeek V4 Pro 0423",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,thinkingLevelMap:{off:"none",minimal:null,low:null,medium:null,high:"high",xhigh:"xhigh",max:null},input:["text"],cost:{input:.95526,output:1.91052,cacheRead:.079605,cacheWrite:0},contextWindow:1024e3,maxTokens:384e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"ope\
|
|
899
|
-
nrouter",supportsStrictMode:!0,sendSessionAffinityHeaders:!0,requiresReasoningContentOnAssistantMessages:!0}},"chat:deepseek/deepseek-v4-pro-0813":{type:"chat",id:"deepseek/deepseek-v4-pro-0813",name:"DeepSeek: DeepSeek V4 Pro 0813",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:null,high:"high",xhigh:null,max:"max"},input:["text"],cost:{input
|
|
899
|
+
nrouter",supportsStrictMode:!0,sendSessionAffinityHeaders:!0,requiresReasoningContentOnAssistantMessages:!0}},"chat:deepseek/deepseek-v4-pro-0813":{type:"chat",id:"deepseek/deepseek-v4-pro-0813",name:"DeepSeek: DeepSeek V4 Pro 0813",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:null,high:"high",xhigh:null,max:"max"},input:["text"],cost:{input:.66,output:1.98,cacheRead:.022,cacheWrite:0},
|
|
900
900
|
contextWindow:1048576,maxTokens:393216,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",supportsStrictMode:!0,sendSessionAffinityHeaders:!0,requiresReasoningContentOnAssistantMessages:!0}},"chat:deepseek/deepseek-v4.1-flash":{type:"chat",id:"deepseek/deepseek-v4.1-flash",name:"DeepSeek: DeepSeek V4.1 Flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:null,high:"high",xhigh:null,
|
|
901
|
-
max:"max"},input:["text","image"],cost:{input:.
|
|
902
|
-
|
|
901
|
+
max:"max"},input:["text","image"],cost:{input:.3,output:1.2,cacheRead:.006,cacheWrite:0},contextWindow:1048576,maxTokens:943718,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",supportsStrictMode:!0,sendSessionAffinityHeaders:!0,requiresReasoningContentOnAssistantMessages:!0},inputLimits:{images:{resize:{maxWidth:2e3,maxHeight:2e3,maxBytes:4718592,jpegQuality:80}}}},"chat:deepseek/deepseek-v4.1-flash-1017":{type:"chat",id:"deepseek/deepseek-v4.1-flash-1017",name:"DeepSeek: DeepSeek V\
|
|
902
|
+
4.1 Flash 1017",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:null,high:"high",xhigh:null,max:"max"},input:["text","image"],cost:{input:.15,output:.6,cacheRead:.003,cacheWrite:0},contextWindow:1048576,maxTokens:393216,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",supportsStrictMode:!0,sendSessionAffinityHeaders:!0,requiresReasoningContentOnAssistantMessages:!0},inputLimits:{
|
|
903
903
|
images:{resize:{maxWidth:2e3,maxHeight:2e3,maxBytes:4718592,jpegQuality:80}}}},"chat:deepseek/deepseek-v4.1-flash:batch":{type:"chat",id:"deepseek/deepseek-v4.1-flash:batch",name:"DeepSeek: DeepSeek V4.1 Flash (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:null,high:"high",xhigh:null,max:"max"},input:["text","image"],cost:{input:.05,output:.15,cacheRead:.004,cacheWrite:0},contextWindow:1048576,
|
|
904
904
|
maxTokens:384e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",supportsStrictMode:!0,sendSessionAffinityHeaders:!0,requiresReasoningContentOnAssistantMessages:!0},inputLimits:{images:{resize:{maxWidth:2e3,maxHeight:2e3,maxBytes:4718592,jpegQuality:80}}}},"chat:dots-studio/dots-3-note-preview:free":{type:"chat",id:"dots-studio/dots-3-note-preview:free",name:"Dots Studio: Dots3-Note Preview (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",
|
|
905
905
|
reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:512e3,maxTokens:460800,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",supportsStrictMode:!0,sendSessionAffinityHeaders:!0},inputLimits:{images:{resize:{maxWidth:2e3,maxHeight:2e3,maxBytes:4718592,jpegQuality:80}}}},"chat:elorian/glimpse":{type:"chat",id:"elorian/glimpse",name:"Elorian: Glimpse",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,
|
|
@@ -1677,8 +1677,8 @@ input:["text"],compat:{allowEmptySignature:!0},cost:{input:.07,output:.4,cacheRe
|
|
|
1677
1677
|
lm-5",name:"GLM 5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],compat:{allowEmptySignature:!0},cost:{input:1,output:3.2,cacheRead:0,cacheWrite:0},contextWindow:202800,maxTokens:131100,type:"chat"},"chat:zai/glm-5-turbo":{id:"zai/glm-5-turbo",name:"GLM 5 Turbo",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],compat:{allowEmptySignature:!0},cost:{input:1.2,
|
|
1678
1678
|
output:4,cacheRead:.24,cacheWrite:0},contextWindow:202800,maxTokens:131100,type:"chat"},"chat:zai/glm-5.1":{id:"zai/glm-5.1",name:"GLM 5.1",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],compat:{allowEmptySignature:!0},cost:{input:1.4,output:4.4,cacheRead:.26,cacheWrite:0},contextWindow:202800,maxTokens:64e3,type:"chat"},"chat:zai/glm-5.2":{id:"zai/glm-5.2",name:"GLM 5.2",api:"anthropic-messages",baseUrl:"https://ai-gatewa\
|
|
1679
1679
|
y.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],compat:{allowEmptySignature:!0},cost:{input:.8,output:2.55,cacheRead:.16,cacheWrite:0},contextWindow:1e6,maxTokens:128e3,type:"chat"},"chat:zai/glm-5.2-fast":{id:"zai/glm-5.2-fast",name:"GLM 5.2 Fast",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],compat:{allowEmptySignature:!0},cost:{input:2.8,output:8.8,cacheRead:.56,cacheWrite:0},contextWindow:1e6,maxTokens:128e3,
|
|
1680
|
-
type:"chat"},"chat:zai/glm-5.3":{id:"zai/glm-5.3",name:"GLM 5.3",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],compat:{allowEmptySignature:!0},cost:{input:1.
|
|
1681
|
-
|
|
1680
|
+
type:"chat"},"chat:zai/glm-5.3":{id:"zai/glm-5.3",name:"GLM 5.3",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],compat:{allowEmptySignature:!0},cost:{input:1.2,output:4,cacheRead:.2,cacheWrite:0},contextWindow:1e6,maxTokens:1e6,type:"chat"},"chat:zai/glm-5.3-fast":{id:"zai/glm-5.3-fast",name:"GLM 5.3 Fast",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],
|
|
1681
|
+
compat:{allowEmptySignature:!0},cost:{input:2.1,output:6.6,cacheRead:.21,cacheWrite:0},contextWindow:1048576,maxTokens:262144,type:"chat"},"chat:zai/glm-5.3-flash":{id:"zai/glm-5.3-flash",name:"GLM 5.3 Flash",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],compat:{allowEmptySignature:!0},cost:{input:.15,output:.5,cacheRead:.03,cacheWrite:0},contextWindow:1e6,maxTokens:131e3,inputLimits:{images:{resize:{maxWidth:2e3,
|
|
1682
1682
|
maxHeight:2e3,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:zai/glm-5.3-flashx":{id:"zai/glm-5.3-flashx",name:"GLM 5.3 FlashX",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],compat:{allowEmptySignature:!0},cost:{input:.37,output:1.25,cacheRead:.075,cacheWrite:0},contextWindow:1e6,maxTokens:131072,inputLimits:{images:{resize:{maxWidth:2e3,maxHeight:2e3,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:za\
|
|
1683
1683
|
i/glm-5v-turbo":{id:"zai/glm-5v-turbo",name:"GLM 5V Turbo",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],compat:{allowEmptySignature:!0},cost:{input:1.2,output:4,cacheRead:.24,cacheWrite:0},contextWindow:2e5,maxTokens:128e3,inputLimits:{images:{resize:{maxWidth:2e3,maxHeight:2e3,maxBytes:4718592,jpegQuality:80}}},type:"chat"}},"typesafe-system-one":{"classifier:baseten/elephant-1":{type:"classifier",id:"baseten/el\
|
|
1684
1684
|
ephant-1",name:"Elephant-1",api:"typesafe-system-one",provider:"vercel-ai-gateway",baseUrl:"https://ai-gateway.vercel.sh/typesafe/v1",input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:16384},"classifier:baseten/mammoth-1":{type:"classifier",id:"baseten/mammoth-1",name:"Mammoth-1",api:"typesafe-system-one",provider:"vercel-ai-gateway",baseUrl:"https://ai-gateway.vercel.sh/typesafe/v1",input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:16384},
|
|
@@ -1748,13 +1748,13 @@ CLOUDFLARE_API_KEY,ctx,credential,signal),accountId=await resolveValue(CLOUDFLAR
|
|
|
1748
1748
|
ey",login:async interaction=>{let key=await interaction.prompt({type:"secret",message:"Enter Cloudflare API key"}),accountId=await interaction.prompt({type:"text",message:"Enter Cloudflare account ID"});return{type:"api_key",key,env:{CLOUDFLARE_ACCOUNT_ID:accountId}}},resolve:async({ctx,credential,signal})=>{let resolved=await resolveCloudflareEnv("workers-ai",ctx,credential,signal);if(resolved)return{auth:{apiKey:resolved.apiKey},env:resolved.env,source:resolved.source}}}}function cloudflareAIGatewayAuth(){
|
|
1749
1749
|
return{name:"Cloudflare API key",login:async interaction=>{let key=await interaction.prompt({type:"secret",message:"Enter Cloudflare API key"}),accountId=await interaction.prompt({type:"text",message:"Enter Cloudflare account ID"}),gatewayId=await interaction.prompt({type:"text",message:"Enter Cloudflare AI Gateway ID"});return{type:"api_key",key,env:{CLOUDFLARE_ACCOUNT_ID:accountId,CLOUDFLARE_GATEWAY_ID:gatewayId}}},resolve:async({ctx,credential,signal})=>{let resolved=await resolveCloudflareEnv(
|
|
1750
1750
|
"ai-gateway",ctx,credential,signal);if(resolved)return{auth:{headers:{"cf-aig-authorization":`Bearer ${resolved.apiKey}`,Authorization:null,"x-api-key":null}},env:resolved.env,source:resolved.source}}}}var CLOUDFLARE_ACCOUNT_ID2="CLOUDFLARE_ACCOUNT_ID",CLOUDFLARE_GATEWAY_ID2="CLOUDFLARE_GATEWAY_ID";function resolveCloudflareModel(model,env){if(!env)return model;let baseUrl=model.baseUrl.replaceAll(`{${CLOUDFLARE_ACCOUNT_ID2}}`,env[CLOUDFLARE_ACCOUNT_ID2]??`{${CLOUDFLARE_ACCOUNT_ID2}}`).replaceAll(`{${CLOUDFLARE_GATEWAY_ID2}}`,env[CLOUDFLARE_GATEWAY_ID2]??`{${CLOUDFLARE_GATEWAY_ID2}}`);return baseUrl===model.baseUrl?model:{...model,baseUrl}}function cloudflareStreams(streams){return{stream:(model,context,options)=>streams.
|
|
1751
|
-
stream(resolveCloudflareModel(model,options?.env),context,options),streamSimple:(model,context,options)=>streams.streamSimple(resolveCloudflareModel(model,options?.env),context,options)}}function cloudflareClassifier(classifier){return{classify:(model,context,options)=>classifier.classify(resolveCloudflareModel(model,options?.env),context,options)}}function cloudflareAIGatewayProvider(){return createProvider({id:"cloudflare-ai-gateway",name:"Cloudflare AI Gateway",auth:{apiKey:cloudflareAIGatewayAuth()},models:Object.values(CLOUDFLARE_AI_GATEWAY_MODELS),api:{"anthropic-messages":cloudflareStreams(anthropicMessagesApi()),"openai-completions":cloudflareStreams(openAICompletionsApi()),"openai-responses":cloudflareStreams(openAIResponsesApi())}})}var cloudflareWorkersAISystemOneApi=()=>({classify:async(model,context,options)=>(await import("./cloudflare-workers-ai-system-one-MUJQ6LT2.js")).classify(model,context,options)});function cloudflareWorkersAIProvider(){return createProvider({id:"cloudflare-workers-ai",name:"Cloudflare Workers AI",auth:{apiKey:cloudflareWorkersAIAuth()},models:[...Object.values(CLOUDFLARE_WORKERS_AI_MODELS),...Object.values(CLOUDFLARE_WORKERS_AI_CLASSIFIER_MODELS)],api:cloudflareStreams(openAICompletionsApi()),classifiers:{"cloudflare-workers-ai-system-one":cloudflareClassifier(cloudflareWorkersAISystemOneApi())}})}var manifest_default={schemaVersion:6,generatedAt:"2026-10-
|
|
1751
|
+
stream(resolveCloudflareModel(model,options?.env),context,options),streamSimple:(model,context,options)=>streams.streamSimple(resolveCloudflareModel(model,options?.env),context,options)}}function cloudflareClassifier(classifier){return{classify:(model,context,options)=>classifier.classify(resolveCloudflareModel(model,options?.env),context,options)}}function cloudflareAIGatewayProvider(){return createProvider({id:"cloudflare-ai-gateway",name:"Cloudflare AI Gateway",auth:{apiKey:cloudflareAIGatewayAuth()},models:Object.values(CLOUDFLARE_AI_GATEWAY_MODELS),api:{"anthropic-messages":cloudflareStreams(anthropicMessagesApi()),"openai-completions":cloudflareStreams(openAICompletionsApi()),"openai-responses":cloudflareStreams(openAIResponsesApi())}})}var cloudflareWorkersAISystemOneApi=()=>({classify:async(model,context,options)=>(await import("./cloudflare-workers-ai-system-one-MUJQ6LT2.js")).classify(model,context,options)});function cloudflareWorkersAIProvider(){return createProvider({id:"cloudflare-workers-ai",name:"Cloudflare Workers AI",auth:{apiKey:cloudflareWorkersAIAuth()},models:[...Object.values(CLOUDFLARE_WORKERS_AI_MODELS),...Object.values(CLOUDFLARE_WORKERS_AI_CLASSIFIER_MODELS)],api:cloudflareStreams(openAICompletionsApi()),classifiers:{"cloudflare-workers-ai-system-one":cloudflareClassifier(cloudflareWorkersAISystemOneApi())}})}var manifest_default={schemaVersion:6,generatedAt:"2026-10-23T10:43:47.944Z",structureHash:"9fa281507da7e19d07e68f146467af7b2762b756c1878143935837f58ff98b43",files:{"amazon-bedrock.json":"5c5a40b2ad4456a7f478aab32f10b2dad5a9dee93184eb38c98721c10fe49ba2","ant-ling.json":"628feab3ef6c7d80ce96f75999804e1d9f05fec3851e5302e30fff3b69db90f6","anthropic.json":"91f5da01452c7746645d3405bc91e09f849e4e4687c7c7ff22d8976eafe64b87","azure.json":"3b008f124eb5089ecf37b918545b5b4da1c842b982383d4b4b4b32383adcc6ca",
|
|
1752
1752
|
"baseten.json":"5bd3c98c61769388b3724368ef964d16b7a58e41a6edcf4ebceb9d4ac0a21d3b","cerebras.json":"2eb969b2956844f9a641d3de52c19f1791293c58f607282fb3b0ebfe85ff66f8","cloudflare-ai-gateway.json":"6c4f293c27f26a7b005fdd2ea3059668836a5c21097d7df1a03ec03ca540c091","cloudflare-workers-ai.json":"89e822178dee9fc8702c8d4ea0f30b85f7525ce4e38b5e26cc5d62cc2784a93a","deepseek.json":"10a296fb3e898f7715c80890c8af0af4f5fd58f22dbcd6612fdc5d762157ccdc","fireworks.json":"dae512231a827203db11907889cf235fda8ea4ee10\
|
|
1753
1753
|
447d6376d83ed712b372a2","github-copilot.json":"b6bf50b945113db1e6cd504b67a68670c4e29380c4e2bdf16ab091eb181be498","google-vertex.json":"564d692a4292ef12e98c8ec056a39948ea64e10851f5ddaaebcc37b585545231","google.json":"b61fb0e27da5be60e1112e46955c5923656cb4d62bb221f834a9463d764ef5de","groq.json":"087df37206e9eed8b10f1e558e4c496289bef60074b7e8afba4f20fb102b4ec2","huggingface.json":"2c78f762f4aa8d0e351f53d4c3fa971557175f315f1c6e3c63ddb45dd764151b","kimi-coding.json":"2b0567b9de6275aacf2fe125b16d6982f\
|
|
1754
1754
|
85f396d8293649f604bbebaec77188f","meta.json":"563f5ec07973f52ab8c3eb26ef91a36ad8a79e950b37174935666cdcb624bf35","minimax-cn.json":"cb77625db6cbe03fe83bfcb340bde4f7d70997333c86420939da7f64dc3c9575","minimax.json":"0422f9e210cfd7f138ed015201290781800ecdc00fb398aa37b52dbd8c1fc8f3","mistral.json":"8b6dbb21d6794d3ef606147ac7b05c355748a640224da9072f1081a908fe444f","moonshotai-cn.json":"0dbd6b063a0abdbe55d5dc59dd4dade566c2ea817ad6184bc8d20655ecba1daf","moonshotai.json":"1da2c4e34f22aef17a07c974d85bdee8\
|
|
1755
|
-
e1b68b6dc712e3769c935b3f1e7dadca","nvidia.json":"6f66192c21788b4555f7e77bd7c14201172edf355be8d318f96ff8d0d6921054","openai-codex.json":"75dfc2f9e4b1e039978e069d94c983595ef8ff02eb64481901bedae5883b1d3f","openai.json":"cf5e119eb05f47bbf1dbad179de6a07b904bf7673e96691be72ab0b1fe40a781","opencode-go.json":"4d3b6505c87e3959624430b789b534d6a36a22b1d475b4b5ca0d7a9f6845038c","opencode.json":"cbe65d07905d409ef4d81ec5d9258157e0f5b75a62c2dbf7d153133fdba3dc6d","openrouter.json":"
|
|
1756
|
-
|
|
1757
|
-
a4429a2f696d5cc5273969af61a7310bda07d6bdcd27bf9ac9c76c534cc43716","vercel-ai-gateway.json":"
|
|
1755
|
+
e1b68b6dc712e3769c935b3f1e7dadca","nvidia.json":"6f66192c21788b4555f7e77bd7c14201172edf355be8d318f96ff8d0d6921054","openai-codex.json":"75dfc2f9e4b1e039978e069d94c983595ef8ff02eb64481901bedae5883b1d3f","openai.json":"cf5e119eb05f47bbf1dbad179de6a07b904bf7673e96691be72ab0b1fe40a781","opencode-go.json":"4d3b6505c87e3959624430b789b534d6a36a22b1d475b4b5ca0d7a9f6845038c","opencode.json":"cbe65d07905d409ef4d81ec5d9258157e0f5b75a62c2dbf7d153133fdba3dc6d","openrouter.json":"a7afeaa46e62378915d978fd56aac\
|
|
1756
|
+
0528cf965b37f32f3c3d6e783a51d1b9f72","qwen-token-plan-cn.json":"64427a6adeb3e7dd1857d68bef9bb12097632b646ed151b740e209143e31341e","qwen-token-plan-individual.json":"0fb7cf64faf39d1a3b0a884210a86c87084b805eda15644f5f39293287b959dd","qwen-token-plan.json":"37b9a76c54090228d1026a8f0fcb4d304b00d64b1a3a94cb2ae6e677d2c52b13","radius.json":"49da11ea2e6881e72b3cc32b05f5326cf539332896b47751636f4c19a69911c4","together.json":"2a28fa1978c996ac0a7f0fc07f0c98a37dbf282afe77c0f141dab0c36791ef83","typesafe.json":"\
|
|
1757
|
+
a4429a2f696d5cc5273969af61a7310bda07d6bdcd27bf9ac9c76c534cc43716","vercel-ai-gateway.json":"f0eab6fb7164524258219bb6ea26f8746b3ebd7f2686c10c62558169cd6b4277","xai.json":"59f8a7bdf14e79ba1b0d0a37e56251bbf100420bdac7d6af5942508fdb990f11","xiaomi-token-plan-ams.json":"bfd33741da693bdb8e8ebd4e7b90c3e90820aa18432ad081a5a98db13c6bd296","xiaomi-token-plan-cn.json":"4b61d78feae3a926fda918c3fd3a9afaf2ca60c1bba0af8270a5398fb50a983e","xiaomi-token-plan-sgp.json":"b05a197ce24fd69fc9440f4ba929984ac7a0fefbe80\
|
|
1758
1758
|
83268734b422e721987ec","xiaomi.json":"495b5fddf3c3ec8904fecc15c4c19536f4961dce7b51512b6909d2df2e739824","zai-coding-cn.json":"cc9e0768e726ef55d2b7af853ac5f3585dc72575932cb38840a3877d18736b78","zai.json":"58e6642fdfb736f0b9a4a277c760c536a3cea66a030abbfb2615f7b2851d5c6f"}};function deepseekProvider(){return createProvider({id:"deepseek",name:"DeepSeek",baseUrl:"https://api.deepseek.com",auth:{apiKey:envApiKeyAuth("DeepSeek API key",["DEEPSEEK_API_KEY"])},models:Object.values(DEEPSEEK_MODELS),api:openAICompletionsApi()})}function fireworksProvider(){return createProvider({id:"fireworks",name:"Fireworks",baseUrl:"https://api.fireworks.ai/inference",auth:{apiKey:envApiKeyAuth("Fireworks API key",["FIREWORKS_API_KEY"])},models:Object.values(FIREWORKS_MODELS),api:{"anthropic-messages":anthropicMessagesApi(),"openai-completions":openAICompletionsApi()}})}function githubCopilotProvider(){return createProvider({id:"github-copilot",name:"GitHub Copilot",baseUrl:"https://api.individual.githubcopilot.com",auth:{apiKey:envApiKeyAuth("GitHub Copilot token",["COPILOT_GITHUB_TOKEN"]),oauth:lazyOAuth({name:"GitHub Copilot",isSubscription:!0,load:loadGitHubCopilotOAuth})},models:Object.values(GITHUB_COPILOT_MODELS),filterModels:(models,credential)=>{if(credential?.type!=="oauth")return models;let availableModelIds=credential.availableModelIds;if(!Array.isArray(
|
|
1759
1759
|
availableModelIds)||!availableModelIds.every(id=>typeof id=="string"))return models;let available=new Set(availableModelIds);return models.filter(model=>available.has(model.id))},api:{"anthropic-messages":anthropicMessagesApi(),"openai-completions":openAICompletionsApi(),"openai-responses":openAIResponsesApi()}})}function googleProvider(){return createProvider({id:"google",name:"Google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",auth:{apiKey:envApiKeyAuth("Gemini API key",["GEMINI_API_KEY"])},models:Object.values(GOOGLE_MODELS),api:googleGenerativeAIApi()})}var VERTEX_ADC_PATH="~/.config/gcloud/application_default_credentials.json",vertexAuth={name:"Google Cloud credentials",login:async interaction=>{interaction.signal.throwIfAborted();let method=await interaction.prompt({type:"select",message:"Select Google Vertex AI authentication method:",options:[{id:"api-key",label:"Google Cloud API key"},{id:"adc",label:"Application Default Credentials"},{id:"service-account",label:"Service account credentials file"}]});if(interaction.signal.throwIfAborted(),
|
|
1760
1760
|
method==="api-key")return{type:"api_key",key:await interaction.prompt({type:"secret",message:"Enter Google Cloud API key"})};if(method!=="adc"&&method!=="service-account")throw new Error(`Unknown Google Vertex AI auth method: ${method}`);interaction.notify({type:"info",message:method==="adc"?"Run `gcloud auth application-default login`, then provide the project and location.":"Provide a service account credentials file, project, and location.",links:[{label:"Application Default Credentials",url:"\
|