import{r as o,t as y}from"./path-DtYs9Dst.js";import{t as s}from"./array-CEZNxKGf.js";import{v as x}from"./step-B5y1YzZ4.js";function d(t){return t[0]}function h(t){return t[1]}function E(t,u){var a=o(!0),i=null,l=x,e=null,v=y(r);t=typeof t=="function"?t:t===void 0?d:o(t),u=typeof u=="function"?u:u===void 0?h:o(u);function r(n){var f,m=(n=s(n)).length,p,c=!1,g;for(i??(e=l(g=v())),f=0;f<=m;++f)!(f<m&&a(p=n[f],f,n))===c&&((c=!c)?e.lineStart():e.lineEnd()),c&&e.point(+t(p,f,n),+u(p,f,n));if(g)return e=null,g+""||null}return r.x=function(n){return arguments.length?(t=typeof n=="function"?n:o(+n),r):t},r.y=function(n){return arguments.length?(u=typeof n=="function"?n:o(+n),r):u},r.defined=function(n){return arguments.length?(a=typeof n=="function"?n:o(!!n),r):a},r.curve=function(n){return arguments.length?(l=n,i!=null&&(e=l(i)),r):l},r.context=function(n){return arguments.length?(n==null?i=e=null:e=l(i=n),r):i},r}export{d as n,h as r,E as t};
