MCPcopy Index your code
hub / github.com/ChinaSiro/claude-code-sourcemap / ZAK

Function ZAK

package/cli.js:3052–3052  ·  view source on GitHub ↗
(q,K)

Source from the content-addressed store, hash-verified

3050`)}}})});function fsz(q){let K=0;for(let _ of q){if(!_)continue;if(K+=(_.text?.length??0)+(_.image?.image_data.length??0),K>Dsz)return!0}return!1}function gs1(q){if(!q)return"";let K=Array.isArray(q)?q.join(""):q,{truncatedContent:_}=xzK(K);return _}function Zsz(q){if(typeof q["image/png"]==="string")return{image_data:q["image/png"].replace(/\s/g,""),media_type:"image/png"};if(typeof q["image/jpeg"]==="string")return{image_data:q["image/jpeg"].replace(/\s/g,""),media_type:"image/jpeg"};return}function Gsz(q){switch(q.output_type){case"stream":return{output_type:q.output_type,text:gs1(q.text)};case"execute_result":case"display_data":return{output_type:q.output_type,text:gs1(q.data?.["text/plain"]),image:q.data&&Zsz(q.data)};case"error":return{output_type:q.output_type,text:gs1(`${q.ename}: ${q.evalue}
3051${q.traceback.join(`
3052`)}`)}}}function fAK(q,K,_,z){let Y=q.id??`cell-${K}`,$={cellType:q.cell_type,source:Array.isArray(q.source)?q.source.join(""):q.source,execution_count:q.cell_type==="code"?q.execution_count||void 0:void 0,cell_id:Y};if(q.cell_type==="code")$.language=_;if(q.cell_type==="code"&&q.outputs?.length){let A=q.outputs.map(Gsz);if(!z&&fsz(A))$.outputs=[{output_type:"stream",text:`Outputs are too large to include. Use ${_q} with: cat <notebook_path> | jq '.cells[${K}].outputs'`}];else $.outputs=A}return $}function Tsz(q){let K=[];if(q.cellType!=="code")K.push(`<cell_type>${q.cellType}</cell_type>`);if(q.language!=="python"&&q.cellType==="code")K.push(`<language>${q.language}</language>`);return{text:`<cell id="${q.cell_id}">${K.join("")}${q.source}</cell id="${q.cell_id}">`,type:"text"}}function vsz(q){let K=[];if(q.text)K.push({text:`
3053${q.text}`,type:"text"});if(q.image)K.push({type:"image",source:{data:q.image.image_data,media_type:q.image.media_type,type:"base64"}});return K}function ksz(q){let K=Tsz(q),_=q.outputs?.flatMap(vsz);return[K,..._??[]]}async function ZAK(q,K){let _=lq(q),Y=(await X8().readFileBytes(_)).toString("utf-8"),$=r8(Y),A=$.metadata.language_info?.name??"python";if(K){let O=$.cells.find((w)=>w.id===K);if(!O)throw Error(`Cell with ID "${K}" not found in notebook`);return[fAK(O,$.cells.indexOf(O),A,!0)]}return $.cells.map((O,w)=>fAK(O,w,A,!1))}function GAK(q,K){let _=q.flatMap(ksz);return{tool_use_id:K,type:"tool_result",content:_.reduce((z,Y)=>{if(z.length===0)return[Y];let $=z[z.length-1];if($&&$.type==="text"&&Y.type==="text")return $.text+=`
3054`+Y.text,z;return z.push(Y),z},[])}}function Y88(q){let K=q.match(/^cell-(\d+)$/);if(K&&K[1]){let _=parseInt(K[1],10);return isNaN(_)?void 0:_}return}var Dsz=1e4;var ku8=y(()=>{NI8();e7();dz();l8()});var TAK="Replace the contents of a specific cell in a Jupyter notebook.",vAK="Completely replaces the contents of a specific cell in a Jupyter notebook (.ipynb file) with new source. Jupyter notebooks are interactive documents that combine code, text, and visualizations, commonly used for data analysis and scientific computing. The notebook_path parameter must be an absolute path, not a relative path. The cell_number is 0-indexed. Use edit_mode=insert to add a new cell at the index specified by cell_number. Use edit_mode=delete to delete the cell at the index specified by cell_number.";import{relative as Vsz}from"path";function kAK(q){let K=z6(20),{notebook_path:_,cell_id:z,new_source:Y,cell_type:$,edit_mode:A,verbose:O}=q,w=A===void 0?"replace":A,j=w==="delete"?"delete":`${w} cell in`,H;if(K[0]!==j)H=g0.createElement(k,{color:"subtle"},"User rejected ",j," "),K[0]=j,K[1]=H;else H=K[1];let J;if(K[2]!==_||K[3]!==O)J=O?_:Vsz(Z8(),_),K[2]=_,K[3]=O,K[4]=J;else J=K[4];let M;if(K[5]!==J)M=g0.createElement(k,{bold:!0,color:"subtle"},J),K[5]=J,K[6]=M;else M=K[6];let X;if(K[7]!==z)X=g0.createElement(k,{color:"subtle"}," at cell ",z),K[7]=z,K[8]=X;else X=K[8];let P;if(K[9]!==H||K[10]!==M||K[11]!==X)P=g0.createElement(u,{flexDirection:"row"},H,M,X),K[9]=H,K[10]=M,K[11]=X,K[12]=P;else P=K[12];let W;if(K[13]!==$||K[14]!==w||K[15]!==Y)W=w!=="delete"&&g0.createElement(u,{marginTop:1,flexDirection:"column"},g0.createElement(zy,{code:Y,filePath:$==="markdown"?"file.md":"file.py",dim:!0})),K[13]=$,K[14]=w,K[15]=Y,K[16]=W;else W=K[16];let D;if(K[17]!==P||K[18]!==W)D=g0.createElement(s8,null,g0.createElement(u,{flexDirection:"column"},P,W)),K[17]=P,K[18]=W,K[19]=D;else D=K[19];return D}var g0;var VAK=y(()=>{q8();I7();s6();gj6();gK();g0=O6(D6(),1)});function Fs1(q){if(!q?.notebook_path)return null;return _3(q.notebook_path)}function NAK({notebook_path:q,cell_id:K,new_source:_,cell_type:z,edit_mode:Y},{verbose:$}){if(!q||!_||!z)return null;let A=$?q:_3(q);if($)return Hz.createElement(Hz.Fragment,null,Hz.createElement(x0,{filePath:q},A),`@${K}, content: ${_.slice(0,30)}…, cell_type: ${z}, edit_mode: ${Y??"replace"}`);return Hz.createElement(Hz.Fragment,null,Hz.createElement(x0,{filePath:q},A),`@${K}`)}function yAK(q,{verbose:K}){return Hz.createElement(kAK,{notebook_path:q.notebook_path,cell_id:q.cell_id,new_source:q.new_source,cell_type:q.cell_type,edit_mode:q.edit_mode,verbose:K})}function EAK(q,{verbose:K}){if(!K&&typeof q==="string"&&o4(q,"tool_use_error"))return Hz.createElement(s8,null,Hz.createElement(k,{color:"error"},"Error editing notebook"));return Hz.createElement(Y2,{result:q,verbose:K})}function LAK({cell_id:q,new_source:K,error:_}){if(_)return Hz.createElement(s8,null,Hz.createElement(k,{color:"error"},_));return Hz.createElement(s8,null,Hz.createElement(u,{flexDirection:"column"},Hz.createElement(k,null,"Updated cell ",Hz.createElement(k,{bold:!0},q),":"),Hz.createElement(u,{marginLeft:2},Hz.createElement(zy,{code:K,filePath:"notebook.py"}))))}var Hz;var RAK=y(()=>{i1();bN();YK6();gj6();gK();VAK();s6();bK();Hz=O6(D6(),1)});import{extname as Nsz,isAbsolute as hAK,resolve as SAK}from"path";var ysz,Esz,qp;var eL6=y(()=>{oN();x7();Bq();I7();y8();bK();ZE();vO();ku8();Tz();l8();RAK();ysz=B6(()=>L.strictObject({notebook_path:L.string().describe("The absolute path to the Jupyter notebook file to edit (must be absolute, not relative)"),cell_id:L.string().optional().describe("The ID of the cell to edit. When inserting a new cell, the new cell will be inserted after the cell with this ID, or at the beginning if not specified."),new_source:L.string().describe("The new source for the cell"),cell_type:L.enum(["code","markdown"]).optional().describe("The type of the cell (code or markdown). If not specified, it defaults to the current cell type. If using edit_mode=insert, this is required."),edit_mode:L.enum(["replace","insert","delete"]).optional().describe("The type of edit to make (replace, insert, delete). Defaults to replace.")})),Esz=B6(()=>L.object({new_source:L.string().describe("The new source code that was written to the cell"),cell_id:L.string().optional().describe("The ID of the cell that was edited"),cell_type:L.enum(["code","markdown"]).describe("The type of the cell"),language:L.string().describe("The programming language of the notebook"),edit_mode:L.string().describe("The edit mode that was used"),error:L.string().optional().describe("Error message if the operation failed"),notebook_path:L.string().describe("The path to the notebook file"),original_file:L.string().describe("The original notebook content before modification"),updated_file:L.string().describe("The updated notebook content after modification")})),qp=sq({name:nW,searchHint:"edit Jupyter notebook cells (.ipynb)",maxResultSizeChars:1e5,shouldDefer:!0,async description(){return TAK},async prompt(){return vAK},userFacingName(){return"Edit Notebook"},getToolUseSummary:Fs1,getActivityDescription(q){let K=Fs1(q);return K?`Editing notebook ${K}`:"Editing notebook"},get inputSchema(){return ysz()},get outputSchema(){return Esz()},toAutoClassifierInput(q){{let K=q.edit_mode??"replace";return`${q.notebook_path} ${K}: ${q.new_source}`}return""},getPath(q){return q.notebook_path},async checkPermissions(q,K){let _=K.getAppState();return Qj6(qp,q,_.toolPermissionContext)},mapToolResultToToolResultBlockParam({cell_id:q,edit_mode:K,new_source:_,error:z},Y){if(z)return{tool_use_id:Y,type:"tool_result",content:z,is_error:!0};switch(K){case"replace":return{tool_use_id:Y,type:"tool_result",content:`Updated cell ${q} with ${_}`};case"insert":return{tool_use_id:Y,type:"tool_result",content:`Inserted cell ${q} with ${_}`};case"delete":return{tool_use_id:Y,type:"tool_result",content:`Deleted cell ${q}`};default:return{tool_use_id:Y,type:"tool_result",content:"Unknown edit mode"}}},renderToolUseMessage:NAK,renderToolUseRejectedMessage:yAK,renderToolUseErrorMessage:EAK,renderToolResultMessage:LAK,async validateInput({notebook_path:q,cell_type:K,cell_id:_,edit_mode:z="replace"},Y){let $=hAK(q)?q:SAK(Z8(),q);if($.startsWith("\\\\")||$.startsWith("//"))return{result:!0};if(Nsz($)!==".ipynb")return{result:!1,message:"File must be a Jupyter notebook (.ipynb file). For editing other file types, use the FileEdit tool.",errorCode:2};if(z!=="replace"&&z!=="insert"&&z!=="delete")return{result:!1,message:"Edit mode must be replace, insert, or delete.",errorCode:4};if(z==="insert"&&!K)return{result:!1,message:"Cell type is required when using edit_mode=insert.",errorCode:5};let A=Y.readFileState.get($);if(!A)return{result:!1,message:"File has not been read yet. Read it first before writing to it.",errorCode:9};if(ik($)>A.timestamp)return{result:!1,message:"File has been modified since read, either by the user or by a linter. Read it again before attempting to write it.",errorCode:10};let O;try{O=vB($).content}catch(j){if(_7(j))return{result:!1,message:"Notebook file does not exist.",errorCode:1};throw j}let w=m5(O);if(!w)return{result:!1,message:"Notebook is not valid JSON.",errorCode:6};if(!_){if(z!=="insert")return{result:!1,message:"Cell ID must be specified when not inserting a new cell.",errorCode:7}}else if(w.cells.findIndex((H)=>H.id===_)===-1){let H=Y88(_);if(H!==void 0){if(!w.cells[H])return{result:!1,message:`Cell with index ${H} does not exist in notebook.`,errorCode:7}}else return{result:!1,message:`Cell with ID "${_}" not found in notebook.`,errorCode:8}}return{result:!0}},async call({notebook_path:q,new_source:K,cell_id:_,cell_type:z,edit_mode:Y},{readFileState:$,updateFileHistoryState:A},O,w){let j=hAK(q)?q:SAK(Z8(),q);if(e$())await OK6(A,j,w.uuid);try{let{content:H,encoding:J,lineEndings:M}=vB(j),X;try{X=r8(H)}catch{return{data:{new_source:K,cell_type:z??"code",language:"python",edit_mode:"replace",error:"Notebook is not valid JSON.",cell_id:_,notebook_path:j,original_file:"",updated_file:""}}}let P;if(!_)P=0;else{if(P=X.cells.findIndex((v)=>v.id===_),P===-1){let v=Y88(_);if(v!==void 0)P=v}if(Y==="insert")P+=1}let W=Y;if(W==="replace"&&P===X.cells.length){if(W="insert",!z)z="code"}let D=X.metadata.language_info?.name??"python",f=void 0;if(X.nbformat>4||X.nbformat===4&&X.nbformat_minor>=5){if(W==="insert")f=Math.random().toString(36).substring(2,15);else if(_!==null)f=_}if(W==="delete")X.cells.splice(P,1);else if(W==="insert"){let v;if(z==="markdown")v={cell_type:"markdown",id:f,source:K,metadata:{}};else v={cell_type:"code",id:f,source:K,metadata:{},execution_count:null,outputs:[]};X.cells.splice(P,0,v)}else{let v=X.cells[P];if(v.source=K,v.cell_type==="code")v.execution_count=null,v.outputs=[];if(z&&z!==v.cell_type)v.cell_type=z}let Z=g6(X,null,1);return me(j,Z,J,M),$.set(j,{content:Z,timestamp:ik(j),offset:void 0,limit:void 0}),{data:{new_source:K,cell_type:z??"code",language:D,edit_mode:W??"replace",cell_id:f||void 0,error:"",notebook_path:j,original_file:H,updated_file:Z}}}catch(H){if(H instanceof Error)return{data:{new_source:K,cell_type:z??"code",language:"python",edit_mode:"replace",error:H.message,cell_id:_,notebook_path:j,original_file:"",updated_file:""}};return{data:{new_source:K,cell_type:z??"code",language:"python",edit_mode:"replace",error:"Unknown error occurred while editing notebook",cell_id:_,notebook_path:j,original_file:"",updated_file:""}}}}})});function Vu8(q,K){if(Rsz.has(q))return!0;let _=hsz.get(q);if(_){for(let z of _)if(K===z||K.startsWith(z+"/"))return!0}return!1}var Lsz,Rsz,hsz;var Us1=y(()=>{Lsz=new Set(["platform.claude.com","code.claude.com","modelcontextprotocol.io","github.com/anthropics","agentskills.io","docs.python.org","en.cppreference.com","docs.oracle.com","learn.microsoft.com","developer.mozilla.org","go.dev","pkg.go.dev","www.php.net","docs.swift.org","kotlinlang.org","ruby-doc.org","doc.rust-lang.org","www.typescriptlang.org","react.dev","angular.io","vuejs.org","nextjs.org","expressjs.com","nodejs.org","bun.sh","jquery.com","getbootstrap.com","tailwindcss.com","d3js.org","threejs.org","redux.js.org","webpack.js.org","jestjs.io","reactrouter.com","docs.djangoproject.com","flask.palletsprojects.com","fastapi.tiangolo.com","pandas.pydata.org","numpy.org","www.tensorflow.org","pytorch.org","scikit-learn.org","matplotlib.org","requests.readthedocs.io","jupyter.org","laravel.com","symfony.com","wordpress.org","docs.spring.io","hibernate.org","tomcat.apache.org","gradle.org","maven.apache.org","asp.net","dotnet.microsoft.com","nuget.org","blazor.net","reactnative.dev","docs.flutter.dev","developer.apple.com","developer.android.com","keras.io","spark.apache.org","huggingface.co","www.kaggle.com","www.mongodb.com","redis.io","www.postgresql.org","dev.mysql.com","www.sqlite.org","graphql.org","prisma.io","docs.aws.amazon.com","cloud.google.com","learn.microsoft.com","kubernetes.io","www.docker.com","www.terraform.io","www.ansible.com","vercel.com/docs","docs.netlify.com","devcenter.heroku.com","cypress.io","selenium.dev","docs.unity.com","docs.unrealengine.com","git-scm.com","nginx.org","httpd.apache.org"]),{HOSTNAME_ONLY:Rsz,PATH_PREFIXES:hsz}=(()=>{let q=new Set,K=new Map;for(let _ of Lsz){let z=_.indexOf("/");if(z===-1)q.add(_);else{let Y=_.slice(0,z),$=_.slice(z),A=K.get(Y);if(A)A.push($);else K.set(Y,[$])}}return{HOSTNAME_ONLY:q,PATH_PREFIXES:K}})()});function CAK({url:q,prompt:K},{verbose:_}){if(!q)return null;if(_)return`url: "${q}"${_&&K?`, prompt: "${K}"`:""}`;return q}function bAK(){return Vb.default.createElement(s8,{height:1},Vb.default.createElement(k,{dimColor:!0},"Fetching…"))}function xAK({bytes:q,code:K,codeText:_,result:z},Y,{verbose:$}){let A=m4(q);if($)return Vb.default.createElement(u,{flexDirection:"column"},Vb.default.createElement(s8,{height:1},Vb.default.createElement(k,null,"Received ",Vb.default.createElement(k,{bold:!0},A)," (",K," ",_,")")),Vb.default.createElement(u,{flexDirection:"column"},Vb.default.createElement(k,null,z)));return Vb.default.createElement(s8,{height:1},Vb.default.createElement(k,null,"Received ",Vb.default.createElement(k,{bold:!0},A)," (",K," ",_,")"))}function Qs1(q){if(!q?.url)return null;return d5(q.url,PN)}var Vb;var IAK=y(()=>{gK();s6();U7();Vb=O6(D6(),1)});var qR6=m((yjw,uAK)=>{uAK.exports=nj6;nj6.CAPTURING_PHASE=1;nj6.AT_TARGET=2;nj6.BUBBLING_PHASE=3;function nj6(q,K){if(this.type="",this.target=null,this.currentTarget=null,this.eventPhase=nj6.AT_TARGET,this.bubbles=!1,this.cancelable=!1,this.isTrusted=!1,this.defaultPrevented=!1,this.timeStamp=Date.now(),this._propagationStopped=!1,this._immediatePropagationStopped=!1,this._initialized=!0,this._dispatching=!1,q)this.type=q;if(K)for(var _ in K)this[_]=K[_]}nj6.prototype=Object.create(Object.prototype,{constructor:{value:nj6},stopPropagation:{value:function(){this._propagationStopped=!0}},stopImmediatePropagation:{value:function(){this._propagationStopped=!0,this._immediatePropagationStopped=!0}},preventDefault:{value:function(){if(this.cancelable)this.defaultPrevented=!0}},initEvent:{value:function(K,_,z){if(this._initialized=!0,this._dispatching)return;this._propagationStopped=!1,this._immediatePropagationStopped=!1,this.defaultPrevented=!1,this.isTrusted=!1,this.target=null,this.type=K,this.bubbles=_,this.cancelable=z}}})});var cs1=m((Ejw,pAK)=>{var mAK=qR6();pAK.exports=ds1;function ds1(){mAK.call(this),this.view=null,this.detail=0}ds1.prototype=Object.create(mAK.prototype,{constructor:{value:ds1},initUIEvent:{value:function(q,K,_,z,Y){this.initEvent(q,K,_),this.view=z,this.detail=Y}}})});var ns1=m((Ljw,gAK)=>{var BAK=cs1();gAK.exports=ls1;function ls1(){BAK.call(this),this.screenX=this.screenY=this.clientX=this.clientY=0,this.ctrlKey=this.altKey=this.shiftKey=this.metaKey=!1,this.button=0,this.buttons=1,this.relatedTarget=null}ls1.prototype=Object.create(BAK.prototype,{constructor:{value:ls1},initMouseEvent:{value:function(q,K,_,z,Y,$,A,O,w,j,H,J,M,X,P){switch(this.initEvent(q,K,_,z,Y),this.screenX=$,this.screenY=A,this.clientX=O,this.clientY=w,this.ctrlKey=j,this.altKey=H,this.shiftKey=J,this.metaKey=M,this.button=X,X){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2;break;default:this.buttons=0;break}this.relatedTarget=P}},getModifierState:{value:function(q){switch(q){case"Alt":return this.altKey;case"Control":return this.ctrlKey;case"Shift":return this.shiftKey;case"Meta":return this.metaKey;default:return!1}}}})});var Eu8=m((Rjw,UAK)=>{UAK.exports=yu8;var Ssz=1,Csz=3,bsz=4,xsz=5,Isz=7,usz=8,msz=9,psz=11,Bsz=12,gsz=13,Fsz=14,Usz=15,Qsz=17,dsz=18,csz=19,lsz=20,nsz=21,isz=22,rsz=23,osz=24,asz=25,ssz=[null,"INDEX_SIZE_ERR",null,"HIERARCHY_REQUEST_ERR","WRONG_DOCUMENT_ERR","INVALID_CHARACTER_ERR",null,"NO_MODIFICATION_ALLOWED_ERR","NOT_FOUND_ERR","NOT_SUPPORTED_ERR","INUSE_ATTRIBUTE_ERR","INVALID_STATE_ERR","SYNTAX_ERR","INVALID_MODIFICATION_ERR","NAMESPACE_ERR","INVALID_ACCESS_ERR",null,"TYPE_MISMATCH_ERR","SECURITY_ERR","NETWORK_ERR","ABORT_ERR","URL_MISMATCH_ERR","QUOTA_EXCEEDED_ERR","TIMEOUT_ERR","INVALID_NODE_TYPE_ERR","DATA_CLONE_ERR"],tsz=[null,"INDEX_SIZE_ERR (1): the index is not in the allowed range",null,"HIERARCHY_REQUEST_ERR (3): the operation would yield an incorrect nodes model","WRONG_DOCUMENT_ERR (4): the object is in the wrong Document, a call to importNode is required","INVALID_CHARACTER_ERR (5): the string contains invalid characters",null,"NO_MODIFICATION_ALLOWED_ERR (7): the object can not be modified","NOT_FOUND_ERR (8): the object can not be found here","NOT_SUPPORTED_ERR (9): this operation is not supported","INUSE_ATTRIBUTE_ERR (10): setAttributeNode called on owned Attribute","INVALID_STATE_ERR (11): the object is in an invalid state","SYNTAX_ERR (12): the string did not match the expected pattern","INVALID_MODIFICATION_ERR (13): the object can not be modified in this way","NAMESPACE_ERR (14): the operation is not allowed by Namespaces in XML","INVALID_ACCESS_ERR (15): the object does not support the operation or argument",null,"TYPE_MISMATCH_ERR (17): the type of the object does not match the expected type","SECURITY_ERR (18): the operation is insecure","NETWORK_ERR (19): a network error occurred","ABORT_ERR (20): the user aborted an operation","URL_MISMATCH_ERR (21): the given URL does not match another URL","QUOTA_EXCEEDED_ERR (22): the quota has been exceeded","TIMEOUT_ERR (23): a timeout occurred","INVALID_NODE_TYPE_ERR (24): the supplied node is invalid or has an invalid ancestor for this operation","DATA_CLONE_ERR (25): the object can not be cloned."],FAK={INDEX_SIZE_ERR:Ssz,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:Csz,WRONG_DOCUMENT_ERR:bsz,INVALID_CHARACTER_ERR:xsz,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:Isz,NOT_FOUND_ERR:usz,NOT_SUPPORTED_ERR:msz,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:psz,SYNTAX_ERR:Bsz,INVALID_MODIFICATION_ERR:gsz,NAMESPACE_ERR:Fsz,INVALID_ACCESS_ERR:Usz,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:Qsz,SECURITY_ERR:dsz,NETWORK_ERR:csz,ABORT_ERR:lsz,URL_MISMATCH_ERR:nsz,QUOTA_EXCEEDED_ERR:isz,TIMEOUT_ERR:rsz,INVALID_NODE_TYPE_ERR:osz,DATA_CLONE_ERR:asz};function yu8(q){Error.call(this),Error.captureStackTrace(this,this.constructor),this.code=q,this.message=tsz[q],this.name=ssz[q]}yu8.prototype.__proto__=Error.prototype;for($88 in FAK)Nu8={value:FAK[$88]},Object.defineProperty(yu8,$88,Nu8),Object.defineProperty(yu8.prototype,$88,Nu8);var Nu8,$88});var Lu8=m((esz)=>{esz.isApiWritable=!globalThis.__domino_frozen__});var xJ=m((_tz)=>{var bJ=Eu8(),yM=bJ,Ktz=Lu8().isApiWritable;_tz.NAMESPACE={HTML:"http://www.w3.org/1999/xhtml",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink"};_tz.IndexSizeError=function(){throw new bJ(yM.INDEX_SIZE_ERR)};_tz.HierarchyRequestError=function(){throw new bJ(yM.HIERARCHY_REQUEST_ERR)};_tz.WrongDocumentError=function(){throw new bJ(yM.WRONG_DOCUMENT_ERR)};_tz.InvalidCharacterError=function(){throw new bJ(yM.INVALID_CHARACTER_ERR)};_tz.NoModificationAllowedError=function(){throw new bJ(yM.NO_MODIFICATION_ALLOWED_ERR)};_tz.NotFoundError=function(){throw new bJ(yM.NOT_FOUND_ERR)};_tz.NotSupportedError=function(){throw new bJ(yM.NOT_SUPPORTED_ERR)};_tz.InvalidStateError=function(){throw new bJ(yM.INVALID_STATE_ERR)};_tz.SyntaxError=function(){throw new bJ(yM.SYNTAX_ERR)};_tz.InvalidModificationError=function(){throw new bJ(yM.INVALID_MODIFICATION_ERR)};_tz.NamespaceError=function(){throw new bJ(yM.NAMESPACE_ERR)};_tz.InvalidAccessError=function(){throw new bJ(yM.INVALID_ACCESS_ERR)};_tz.TypeMismatchError=function(){throw new bJ(yM.TYPE_MISMATCH_ERR)};_tz.SecurityError=function(){throw new bJ(yM.SECURITY_ERR)};_tz.NetworkError=function(){throw new bJ(yM.NETWORK_ERR)};_tz.AbortError=function(){throw new bJ(yM.ABORT_ERR)};_tz.UrlMismatchError=function(){throw new bJ(yM.URL_MISMATCH_ERR)};_tz.QuotaExceededError=function(){throw new bJ(yM.QUOTA_EXCEEDED_ERR)};_tz.TimeoutError=function(){throw new bJ(yM.TIMEOUT_ERR)};_tz.InvalidNodeTypeError=function(){throw new bJ(yM.INVALID_NODE_TYPE_ERR)};_tz.DataCloneError=function(){throw new bJ(yM.DATA_CLONE_ERR)};_tz.nyi=function(){throw Error("NotYetImplemented")};_tz.shouldOverride=function(){throw Error("Abstract function; should be overriding in subclass.")};_tz.assert=function(q,K){if(!q)throw Error("Assertion failed: "+(K||"")+`
3055`+Error().stack)};_tz.expose=function(q,K){for(var _ in q)Object.defineProperty(K.prototype,_,{value:q[_],writable:Ktz})};_tz.merge=function(q,K){for(var _ in K)q[_]=K[_]};_tz.documentOrder=function(q,K){return 3-(q.compareDocumentPosition(K)&6)};_tz.toASCIILowerCase=function(q){return q.replace(/[A-Z]+/g,function(K){return K.toLowerCase()})};_tz.toASCIIUpperCase=function(q){return q.replace(/[a-z]+/g,function(K){return K.toUpperCase()})}});var is1=m((Cjw,dAK)=>{var ij6=qR6(),xtz=ns1(),Itz=xJ();dAK.exports=QAK;function QAK(){}QAK.prototype={addEventListener:function(K,_,z){if(!_)return;if(z===void 0)z=!1;if(!this._listeners)this._listeners=Object.create(null);if(!this._listeners[K])this._listeners[K]=[];var Y=this._listeners[K];for(var $=0,A=Y.length;$<A;$++){var O=Y[$];if(O.listener===_&&O.capture===z)return}var w={listener:_,capture:z};if(typeof _==="function")w.f=_;Y.push(w)},removeEventListener:function(K,_,z){if(z===void 0)z=!1;if(this._listeners){var Y=this._listeners[K];if(Y)for(var $=0,A=Y.length;$<A;$++){var O=Y[$];if(O.listener===_&&O.capture===z){if(Y.length===1)this._listeners[K]=void 0;else Y.splice($,1);return}}}},dispatchEvent:function(K){return this._dispatchEvent(K,!1)},_dispatchEvent:function(K,_){if(typeof _!=="boolean")_=!1;function z(j,H){var{type:J,eventPhase:M}=H;if(H.currentTarget=j,M!==ij6.CAPTURING_PHASE&&j._handlers&&j._handlers[J]){var X=j._handlers[J],P;if(typeof X==="function")P=X.call(H.currentTarget,H);else{var W=X.handleEvent;if(typeof W!=="function")throw TypeError("handleEvent property of event handler object isnot a function.");P=W.call(X,H)}switch(H.type){case"mouseover":if(P===!0)H.preventDefault();break;case"beforeunload":default:if(P===!1)H.preventDefault();break}}var D=j._listeners&&j._listeners[J];if(!D)return;D=D.slice();for(var f=0,G=D.length;f<G;f++){if(H._immediatePropagationStopped)return;var Z=D[f];if(M===ij6.CAPTURING_PHASE&&!Z.capture||M===ij6.BUBBLING_PHASE&&Z.capture)continue;if(Z.f)Z.f.call(H.currentTarget,H);else{var T=Z.listener.handleEvent;if(typeof T!=="function")throw TypeError("handleEvent property of event listener object is not a function.");T.call(Z.listener,H)}}}if(!K._initialized||K._dispatching)Itz.InvalidStateError();K.isTrusted=_,K._dispatching=!0,K.target=this;var Y=[];for(var $=this.parentNode;$;$=$.parentNode)Y.push($);K.eventPhase=ij6.CAPTURING_PHASE;for(var A=Y.length-1;A>=0;A--)if(z(Y[A],K),K._propagationStopped)break;if(!K._propagationStopped)K.eventPhase=ij6.AT_TARGET,z(this,K);if(K.bubbles&&!K._propagationStopped){K.eventPhase=ij6.BUBBLING_PHASE;for(var O=0,w=Y.length;O<w;O++)if(z(Y[O],K),K._propagationStopped)break}if(K._dispatching=!1,K.eventPhase=ij6.AT_TARGET,K.currentTarget=null,_&&!K.defaultPrevented&&K instanceof xtz)switch(K.type){case"mousedown":this._armed={x:K.clientX,y:K.clientY,t:K.timeStamp};break;case"mouseout":case"mouseover":this._armed=null;break;case"mouseup":if(this._isClick(K))this._doClick(K);this._armed=null;break}return!K.defaultPrevented},_isClick:function(q){return this._armed!==null&&q.type==="mouseup"&&q.isTrusted&&q.button===0&&q.timeStamp-this._armed.t<1000&&Math.abs(q.clientX-this._armed.x)<10&&Math.abs(q.clientY-this._armed.Y)<10},_doClick:function(q){if(this._click_in_progress)return;this._click_in_progress=!0;var K=this;while(K&&!K._post_click_activation_steps)K=K.parentNode;if(K&&K._pre_click_activation_steps)K._pre_click_activation_steps();var _=this.ownerDocument.createEvent("MouseEvent");_.initMouseEvent("click",!0,!0,this.ownerDocument.defaultView,1,q.screenX,q.screenY,q.clientX,q.clientY,q.ctrlKey,q.altKey,q.shiftKey,q.metaKey,q.button,null);var z=this._dispatchEvent(_,!0);if(K){if(z){if(K._post_click_activation_steps)K._post_click_activation_steps(_)}else if(K._cancelled_activation_steps)K._cancelled_activation_steps()}},_setEventHandler:function(K,_){if(!this._handlers)this._handlers=Object.create(null);this._handlers[K]=_},_getEventHandler:function(K){return this._handlers&&this._handlers[K]||null}}});var rs1=m((bjw,cAK)=>{var Va=xJ(),Nb=cAK.exports={valid:function(q){return Va.assert(q,"list falsy"),Va.assert(q._previousSibling,"previous falsy"),Va.assert(q._nextSibling,"next falsy"),!0},insertBefore:function(q,K){Va.assert(Nb.valid(q)&&Nb.valid(K));var _=q,z=q._previousSibling,Y=K,$=K._previousSibling;_._previousSibling=$,z._nextSibling=Y,$._nextSibling=_,Y._previousSibling=z,Va.assert(Nb.valid(q)&&Nb.valid(K))},replace:function(q,K){if(Va.assert(Nb.valid(q)&&(K===null||Nb.valid(K))),K!==null)Nb.insertBefore(K,q);Nb.remove(q),Va.assert(Nb.valid(q)&&(K===null||Nb.valid(K)))},remove:function(q){Va.assert(Nb.valid(q));var K=q._previousSibling;if(K===q)return;var _=q._nextSibling;K._nextSibling=_,_._previousSibling=K,q._previousSibling=q._nextSibling=q,Va.assert(Nb.valid(q))}}});var os1=m((xjw,tAK)=>{tAK.exports={serializeOne:Utz,ɵescapeMatchingClosingTag:oAK,ɵescapeClosingCommentTag:aAK,ɵescapeProcessingInstructionContent:sAK};var rAK=xJ(),rj6=rAK.NAMESPACE,lAK={STYLE:!0,SCRIPT:!0,XMP:!0,IFRAME:!0,NOEMBED:!0,NOFRAMES:!0,PLAINTEXT:!0},utz={area:!0,base:!0,basefont:!0,bgsound:!0,br:!0,col:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},mtz={},nAK=/[&<>\u00A0]/g,iAK=/[&"<>\u00A0]/g;function ptz(q){if(!nAK.test(q))return q;return q.replace(nAK,(K)=>{switch(K){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case" ":return"&nbsp;"}})}function Btz(q){if(!iAK.test(q))return q;return q.replace(iAK,(K)=>{switch(K){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";case'"':return"&quot;";case" ":return"&nbsp;"}})}function gtz(q){var K=q.namespaceURI;if(!K)return q.localName;if(K===rj6.XML)return"xml:"+q.localName;if(K===rj6.XLINK)return"xlink:"+q.localName;if(K===rj6.XMLNS)if(q.localName==="xmlns")return"xmlns";else return"xmlns:"+q.localName;return q.name}function oAK(q,K){let _="</"+K;if(!q.toLowerCase().includes(_))return q;let z=[...q],Y=q.matchAll(new RegExp(_,"ig"));for(let $ of Y)z[$.index]="&lt;";return z.join("")}var Ftz=/--!?>/;function aAK(q){if(!Ftz.test(q))return q;return q.replace(/(--\!?)>/g,"$1&gt;")}function sAK(q){return q.includes(">")?q.replaceAll(">","&gt;"):q}function Utz(q,K){var _="";switch(q.nodeType){case 1:var z=q.namespaceURI,Y=z===rj6.HTML,$=Y||z===rj6.SVG||z===rj6.MATHML?q.localName:q.tagName;_+="<"+$;for(var A=0,O=q._numattrs;A<O;A++){var w=q._attr(A);if(_+=" "+gtz(w),w.value!==void 0)_+='="'+Btz(w.value)+'"'}if(_+=">",!(Y&&utz[$])){var j=q.serialize();if(lAK[$.toUpperCase()])j=oAK(j,$);if(Y&&mtz[$]&&j.charAt(0)===`

Callers 1

aDKFunction · 0.85

Calls 6

lqFunction · 0.85
X8Function · 0.85
r8Function · 0.85
fAKFunction · 0.85
toStringMethod · 0.65
findMethod · 0.45

Tested by

no test coverage detected