Haleshot's picture
Update course materials and assets across various sections, including functional programming, optimization, probability, and Python. Enhance HTML content and ensure consistency in asset management.
565ea71 unverified
raw
history blame
4.73 kB
import{R as t,r as n,o as r,q as a,C as i,u as e,v as s}from"./step-xJWGRC3d.js";import{c as o,a as u}from"./linear-Ba7S-mDj.js";import{i as c}from"./init-DLRA0X12.js";import{bi as l,bj as f,bk as h,bl as b,bm as p,bn as y,bo as v,bp as w,bq as g,br as m,bs as d,bt as M,bu as N,bv as D,bw as j,bx as k,by as x,bz as I,bA as q,bB as A,bC as B,bD as C,bE as F,bF as P}from"./index-BiV-b1K2.js";function z(t,n){let r;if(void 0===n)for(const a of t)null!=a&&(r<a||void 0===r&&a>=a)&&(r=a);else{let a=-1;for(let i of t)null!=(i=n(i,++a,t))&&(r<i||void 0===r&&i>=i)&&(r=i)}return r}function E(t,n){let r;if(void 0===n)for(const a of t)null!=a&&(r>a||void 0===r&&a>=a)&&(r=a);else{let a=-1;for(let i of t)null!=(i=n(i,++a,t))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function L(t,n,r,a,i,e){const s=[[f,1,h],[f,5,5*h],[f,15,15*h],[f,30,30*h],[e,1,b],[e,5,5*b],[e,15,15*b],[e,30,30*b],[i,1,p],[i,3,3*p],[i,6,6*p],[i,12,12*p],[a,1,y],[a,2,2*y],[r,1,v],[n,1,w],[n,3,3*w],[t,1,g]];function o(n,r,a){const i=Math.abs(r-n)/a,e=l((([,,t])=>t)).right(s,i);if(e===s.length)return t.every(m(n/g,r/g,a));if(0===e)return d.every(Math.max(m(n,r,a),1));const[o,u]=s[i/s[e-1][2]<s[e][2]/i?e-1:e];return o.every(u)}return[function(t,n,r){const a=n<t;a&&([t,n]=[n,t]);const i=r&&"function"==typeof r.range?r:o(t,n,r),e=i?i.range(t,+n+1):[];return a?e.reverse():e},o]}const[R,S]=L(x,k,j,D,N,M),[Y,G]=L(F,C,B,A,q,I),H=Math.PI/180,J=180/Math.PI,K=.96422,O=.82521,Q=4/29,T=6/29,U=3*T*T,V=T*T*T;function W(r){if(r instanceof Z)return new Z(r.l,r.a,r.b,r.opacity);if(r instanceof at)return it(r);r instanceof t||(r=n(r));var a,i,e=nt(r.r),s=nt(r.g),o=nt(r.b),u=$((.2225045*e+.7168786*s+.0606169*o)/1);return e===s&&s===o?a=i=u:(a=$((.4360747*e+.3850649*s+.1430804*o)/K),i=$((.0139322*e+.0971045*s+.7141733*o)/O)),new Z(116*u-16,500*(a-u),200*(u-i),r.opacity)}function X(t,n,r,a){return 1===arguments.length?W(t):new Z(t,n,r,null==a?1:a)}function Z(t,n,r,a){this.l=+t,this.a=+n,this.b=+r,this.opacity=+a}function $(t){return t>V?Math.pow(t,1/3):t/U+Q}function _(t){return t>T?t*t*t:U*(t-Q)}function tt(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function nt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function rt(t,n,r,a){return 1===arguments.length?function(t){if(t instanceof at)return new at(t.h,t.c,t.l,t.opacity);if(t instanceof Z||(t=W(t)),0===t.a&&0===t.b)return new at(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var n=Math.atan2(t.b,t.a)*J;return new at(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new at(t,n,r,null==a?1:a)}function at(t,n,r,a){this.h=+t,this.c=+n,this.l=+r,this.opacity=+a}function it(t){if(isNaN(t.h))return new Z(t.l,0,0,t.opacity);var n=t.h*H;return new Z(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}function et(t){return function(n,r){var a=t((n=rt(n)).h,(r=rt(r)).h),i=e(n.c,r.c),s=e(n.l,r.l),o=e(n.opacity,r.opacity);return function(t){return n.h=a(t),n.c=i(t),n.l=s(t),n.opacity=o(t),n+""}}}r(Z,X,a(i,{brighter(t){return new Z(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new Z(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var n=(this.l+16)/116,r=isNaN(this.a)?n:n+this.a/500,a=isNaN(this.b)?n:n-this.b/200;return r=K*_(r),n=1*_(n),a=O*_(a),new t(tt(3.1338561*r-1.6168667*n-.4906146*a),tt(-.9787684*r+1.9161415*n+.033454*a),tt(.0719453*r-.2289914*n+1.4052427*a),this.opacity)}})),r(at,rt,a(i,{brighter(t){return new at(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new at(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return it(this).rgb()}}));const st=et(s);var ot=et(e);function ut(t,n){var r,a=0,i=(t=t.slice()).length-1,e=t[a],s=t[i];return s<e&&(r=a,a=i,i=r,r=e,e=s,s=r),t[a]=n.floor(e),t[i]=n.ceil(s),t}function ct(t){return new Date(t)}function lt(t){return t instanceof Date?+t:+new Date(+t)}function ft(t,n,r,a,i,e,s,c,l,f){var h=o(),b=h.invert,p=h.domain,y=f(".%L"),v=f(":%S"),w=f("%I:%M"),g=f("%I %p"),m=f("%a %d"),d=f("%b %d"),M=f("%B"),N=f("%Y");function D(t){return(l(t)<t?y:c(t)<t?v:s(t)<t?w:e(t)<t?g:a(t)<t?i(t)<t?m:d:r(t)<t?M:N)(t)}return h.invert=function(t){return new Date(b(t))},h.domain=function(t){return arguments.length?p(Array.from(t,lt)):p().map(ct)},h.ticks=function(n){var r=p();return t(r[0],r[r.length-1],null==n?10:n)},h.tickFormat=function(t,n){return null==n?D:f(n)},h.nice=function(t){var r=p();return t&&"function"==typeof t.range||(t=n(r[0],r[r.length-1],null==t?10:t)),t?p(ut(r,t)):h},h.copy=function(){return u(h,ft(t,n,r,a,i,e,s,c,l,f))},h}function ht(){return c.apply(ft(Y,G,F,C,B,A,q,I,f,P).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}export{z as a,R as b,ft as c,J as d,rt as e,ot as h,st as i,X as l,E as m,ut as n,H as r,ht as t,S as u};