| Server IP : 159.69.118.108 / Your IP : 216.73.216.200 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ubuntu-4gb-fsn1-1 6.8.0-90-generic #91-Ubuntu SMP PREEMPT_DYNAMIC Tue Nov 18 13:53:54 UTC 2025 aarch64 User : root ( 0) PHP Version : 8.2.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/lauthiamkok.net/prototype.lauthiamkok.net.sensewithdata/assets/ |
Upload File : |
import{c as P}from"./vendors.2bf68b2a.js";import{g as w,b as L}from"./google-recaptcha.950252d1.js";var k=()=>({}),B={},C={},S={},I=()=>({width:0,height:0,display:!1}),W={setHeight(e,t){e.height=t},setWidth(e,t){e.width=t},setDisplay(e){e.display=!e.display}},H={getHeight(e){return e.height},getWidth(e){return e.width},getDisplay(e){return e.display}};/*!
Copyright (C) 2010-2013 Raymond Hill: https://github.com/gorhill/Javascript-Voronoi
MIT License: See https://github.com/gorhill/Javascript-Voronoi/LICENSE.md
*/function u(){this.vertices=null,this.edges=null,this.cells=null,this.toRecycle=null,this.beachsectionJunkyard=[],this.circleEventJunkyard=[],this.vertexJunkyard=[],this.edgeJunkyard=[],this.cellJunkyard=[]}u.prototype.reset=function(){if(this.beachline||(this.beachline=new this.RBTree),this.beachline.root)for(var e=this.beachline.getFirst(this.beachline.root);e;)this.beachsectionJunkyard.push(e),e=e.rbNext;this.beachline.root=null,this.circleEvents||(this.circleEvents=new this.RBTree),this.circleEvents.root=this.firstCircleEvent=null,this.vertices=[],this.edges=[],this.cells=[]};u.prototype.sqrt=Math.sqrt;u.prototype.abs=Math.abs;u.prototype.\u03B5=u.\u03B5=1e-9;u.prototype.inv\u03B5=u.inv\u03B5=1/u.\u03B5;u.prototype.equalWithEpsilon=function(e,t){return this.abs(e-t)<1e-9};u.prototype.greaterThanWithEpsilon=function(e,t){return e-t>1e-9};u.prototype.greaterThanOrEqualWithEpsilon=function(e,t){return t-e<1e-9};u.prototype.lessThanWithEpsilon=function(e,t){return t-e>1e-9};u.prototype.lessThanOrEqualWithEpsilon=function(e,t){return e-t<1e-9};u.prototype.RBTree=function(){this.root=null};u.prototype.RBTree.prototype.rbInsertSuccessor=function(e,t){var r;if(e){if(t.rbPrevious=e,t.rbNext=e.rbNext,e.rbNext&&(e.rbNext.rbPrevious=t),e.rbNext=t,e.rbRight){for(e=e.rbRight;e.rbLeft;)e=e.rbLeft;e.rbLeft=t}else e.rbRight=t;r=e}else this.root?(e=this.getFirst(this.root),t.rbPrevious=null,t.rbNext=e,e.rbPrevious=t,e.rbLeft=t,r=e):(t.rbPrevious=t.rbNext=null,this.root=t,r=null);t.rbLeft=t.rbRight=null,t.rbParent=r,t.rbRed=!0;var i,s;for(e=t;r&&r.rbRed;)i=r.rbParent,r===i.rbLeft?(s=i.rbRight,s&&s.rbRed?(r.rbRed=s.rbRed=!1,i.rbRed=!0,e=i):(e===r.rbRight&&(this.rbRotateLeft(r),e=r,r=e.rbParent),r.rbRed=!1,i.rbRed=!0,this.rbRotateRight(i))):(s=i.rbLeft,s&&s.rbRed?(r.rbRed=s.rbRed=!1,i.rbRed=!0,e=i):(e===r.rbLeft&&(this.rbRotateRight(r),e=r,r=e.rbParent),r.rbRed=!1,i.rbRed=!0,this.rbRotateLeft(i))),r=e.rbParent;this.root.rbRed=!1};u.prototype.RBTree.prototype.rbRemoveNode=function(e){e.rbNext&&(e.rbNext.rbPrevious=e.rbPrevious),e.rbPrevious&&(e.rbPrevious.rbNext=e.rbNext),e.rbNext=e.rbPrevious=null;var t=e.rbParent,r=e.rbLeft,i=e.rbRight,s;r?i?s=this.getFirst(i):s=r:s=i,t?t.rbLeft===e?t.rbLeft=s:t.rbRight=s:this.root=s;var f;if(r&&i?(f=s.rbRed,s.rbRed=e.rbRed,s.rbLeft=r,r.rbParent=s,s!==i?(t=s.rbParent,s.rbParent=e.rbParent,e=s.rbRight,t.rbLeft=e,s.rbRight=i,i.rbParent=s):(s.rbParent=t,t=s,e=s.rbRight)):(f=e.rbRed,e=s),e&&(e.rbParent=t),!f){if(e&&e.rbRed){e.rbRed=!1;return}var n;do{if(e===this.root)break;if(e===t.rbLeft){if(n=t.rbRight,n.rbRed&&(n.rbRed=!1,t.rbRed=!0,this.rbRotateLeft(t),n=t.rbRight),n.rbLeft&&n.rbLeft.rbRed||n.rbRight&&n.rbRight.rbRed){(!n.rbRight||!n.rbRight.rbRed)&&(n.rbLeft.rbRed=!1,n.rbRed=!0,this.rbRotateRight(n),n=t.rbRight),n.rbRed=t.rbRed,t.rbRed=n.rbRight.rbRed=!1,this.rbRotateLeft(t),e=this.root;break}}else if(n=t.rbLeft,n.rbRed&&(n.rbRed=!1,t.rbRed=!0,this.rbRotateRight(t),n=t.rbLeft),n.rbLeft&&n.rbLeft.rbRed||n.rbRight&&n.rbRight.rbRed){(!n.rbLeft||!n.rbLeft.rbRed)&&(n.rbRight.rbRed=!1,n.rbRed=!0,this.rbRotateLeft(n),n=t.rbLeft),n.rbRed=t.rbRed,t.rbRed=n.rbLeft.rbRed=!1,this.rbRotateRight(t),e=this.root;break}n.rbRed=!0,e=t,t=t.rbParent}while(!e.rbRed);e&&(e.rbRed=!1)}};u.prototype.RBTree.prototype.rbRotateLeft=function(e){var t=e,r=e.rbRight,i=t.rbParent;i?i.rbLeft===t?i.rbLeft=r:i.rbRight=r:this.root=r,r.rbParent=i,t.rbParent=r,t.rbRight=r.rbLeft,t.rbRight&&(t.rbRight.rbParent=t),r.rbLeft=t};u.prototype.RBTree.prototype.rbRotateRight=function(e){var t=e,r=e.rbLeft,i=t.rbParent;i?i.rbLeft===t?i.rbLeft=r:i.rbRight=r:this.root=r,r.rbParent=i,t.rbParent=r,t.rbLeft=r.rbRight,t.rbLeft&&(t.rbLeft.rbParent=t),r.rbRight=t};u.prototype.RBTree.prototype.getFirst=function(e){for(;e.rbLeft;)e=e.rbLeft;return e};u.prototype.RBTree.prototype.getLast=function(e){for(;e.rbRight;)e=e.rbRight;return e};u.prototype.Diagram=function(e){this.site=e};u.prototype.Cell=function(e){this.site=e,this.halfedges=[],this.closeMe=!1};u.prototype.Cell.prototype.init=function(e){return this.site=e,this.halfedges=[],this.closeMe=!1,this};u.prototype.createCell=function(e){var t=this.cellJunkyard.pop();return t?t.init(e):new this.Cell(e)};u.prototype.Cell.prototype.prepareHalfedges=function(){for(var e=this.halfedges,t=e.length,r;t--;)r=e[t].edge,(!r.vb||!r.va)&&e.splice(t,1);return e.sort(function(i,s){return s.angle-i.angle}),e.length};u.prototype.Cell.prototype.getNeighborIds=function(){for(var e=[],t=this.halfedges.length,r;t--;)r=this.halfedges[t].edge,r.lSite!==null&&r.lSite.voronoiId!=this.site.voronoiId?e.push(r.lSite.voronoiId):r.rSite!==null&&r.rSite.voronoiId!=this.site.voronoiId&&e.push(r.rSite.voronoiId);return e};u.prototype.Cell.prototype.getBbox=function(){for(var e=this.halfedges,t=e.length,r=1/0,i=1/0,s=-1/0,f=-1/0,n,a,l;t--;)n=e[t].getStartpoint(),a=n.x,l=n.y,a<r&&(r=a),l<i&&(i=l),a>s&&(s=a),l>f&&(f=l);return{x:r,y:i,width:s-r,height:f-i}};u.prototype.Cell.prototype.pointIntersection=function(e,t){for(var r=this.halfedges,i=r.length,s,f,n,a;i--;){if(s=r[i],f=s.getStartpoint(),n=s.getEndpoint(),a=(t-f.y)*(n.x-f.x)-(e-f.x)*(n.y-f.y),!a)return 0;if(a>0)return-1}return 1};u.prototype.Vertex=function(e,t){this.x=e,this.y=t};u.prototype.Edge=function(e,t){this.lSite=e,this.rSite=t,this.va=this.vb=null};u.prototype.Halfedge=function(e,t,r){if(this.site=t,this.edge=e,r)this.angle=Math.atan2(r.y-t.y,r.x-t.x);else{var i=e.va,s=e.vb;this.angle=e.lSite===t?Math.atan2(s.x-i.x,i.y-s.y):Math.atan2(i.x-s.x,s.y-i.y)}};u.prototype.createHalfedge=function(e,t,r){return new this.Halfedge(e,t,r)};u.prototype.Halfedge.prototype.getStartpoint=function(){return this.edge.lSite===this.site?this.edge.va:this.edge.vb};u.prototype.Halfedge.prototype.getEndpoint=function(){return this.edge.lSite===this.site?this.edge.vb:this.edge.va};u.prototype.createVertex=function(e,t){var r=this.vertexJunkyard.pop();return r?(r.x=e,r.y=t):r=new this.Vertex(e,t),this.vertices.push(r),r};u.prototype.createEdge=function(e,t,r,i){var s=this.edgeJunkyard.pop();return s?(s.lSite=e,s.rSite=t,s.va=s.vb=null):s=new this.Edge(e,t),this.edges.push(s),r&&this.setEdgeStartpoint(s,e,t,r),i&&this.setEdgeEndpoint(s,e,t,i),this.cells[e.voronoiId].halfedges.push(this.createHalfedge(s,e,t)),this.cells[t.voronoiId].halfedges.push(this.createHalfedge(s,t,e)),s};u.prototype.createBorderEdge=function(e,t,r){var i=this.edgeJunkyard.pop();return i?(i.lSite=e,i.rSite=null):i=new this.Edge(e,null),i.va=t,i.vb=r,this.edges.push(i),i};u.prototype.setEdgeStartpoint=function(e,t,r,i){!e.va&&!e.vb?(e.va=i,e.lSite=t,e.rSite=r):e.lSite===r?e.vb=i:e.va=i};u.prototype.setEdgeEndpoint=function(e,t,r,i){this.setEdgeStartpoint(e,r,t,i)};u.prototype.Beachsection=function(){};u.prototype.createBeachsection=function(e){var t=this.beachsectionJunkyard.pop();return t||(t=new this.Beachsection),t.site=e,t};u.prototype.leftBreakPoint=function(e,t){var r=e.site,i=r.x,s=r.y,f=s-t;if(!f)return i;var n=e.rbPrevious;if(!n)return-1/0;r=n.site;var a=r.x,l=r.y,h=l-t;if(!h)return a;var c=a-i,o=1/f-1/h,p=c/h;return o?(-p+this.sqrt(p*p-2*o*(c*c/(-2*h)-l+h/2+s-f/2)))/o+i:(i+a)/2};u.prototype.rightBreakPoint=function(e,t){var r=e.rbNext;if(r)return this.leftBreakPoint(r,t);var i=e.site;return i.y===t?i.x:1/0};u.prototype.detachBeachsection=function(e){this.detachCircleEvent(e),this.beachline.rbRemoveNode(e),this.beachsectionJunkyard.push(e)};u.prototype.removeBeachsection=function(e){var t=e.circleEvent,r=t.x,i=t.ycenter,s=this.createVertex(r,i),f=e.rbPrevious,n=e.rbNext,a=[e],l=Math.abs;this.detachBeachsection(e);for(var h=f;h.circleEvent&&l(r-h.circleEvent.x)<1e-9&&l(i-h.circleEvent.ycenter)<1e-9;)f=h.rbPrevious,a.unshift(h),this.detachBeachsection(h),h=f;a.unshift(h),this.detachCircleEvent(h);for(var c=n;c.circleEvent&&l(r-c.circleEvent.x)<1e-9&&l(i-c.circleEvent.ycenter)<1e-9;)n=c.rbNext,a.push(c),this.detachBeachsection(c),c=n;a.push(c),this.detachCircleEvent(c);var o=a.length,p;for(p=1;p<o;p++)c=a[p],h=a[p-1],this.setEdgeStartpoint(c.edge,h.site,c.site,s);h=a[0],c=a[o-1],c.edge=this.createEdge(h.site,c.site,void 0,s),this.attachCircleEvent(h),this.attachCircleEvent(c)};u.prototype.addBeachsection=function(e){for(var t=e.x,r=e.y,i,s,f,n,a=this.beachline.root;a;)if(f=this.leftBreakPoint(a,r)-t,f>1e-9)a=a.rbLeft;else if(n=t-this.rightBreakPoint(a,r),n>1e-9){if(!a.rbRight){i=a;break}a=a.rbRight}else{f>-1e-9?(i=a.rbPrevious,s=a):n>-1e-9?(i=a,s=a.rbNext):i=s=a;break}var l=this.createBeachsection(e);if(this.beachline.rbInsertSuccessor(i,l),!(!i&&!s)){if(i===s){this.detachCircleEvent(i),s=this.createBeachsection(i.site),this.beachline.rbInsertSuccessor(l,s),l.edge=s.edge=this.createEdge(i.site,l.site),this.attachCircleEvent(i),this.attachCircleEvent(s);return}if(i&&!s){l.edge=this.createEdge(i.site,l.site);return}if(i!==s){this.detachCircleEvent(i),this.detachCircleEvent(s);var h=i.site,c=h.x,o=h.y,p=e.x-c,g=e.y-o,b=s.site,d=b.x-c,y=b.y-o,R=2*(p*y-g*d),v=p*p+g*g,E=d*d+y*y,x=this.createVertex((y*v-g*E)/R+c,(p*E-d*v)/R+o);this.setEdgeStartpoint(s.edge,h,b,x),l.edge=this.createEdge(h,e,void 0,x),s.edge=this.createEdge(e,b,void 0,x),this.attachCircleEvent(i),this.attachCircleEvent(s);return}}};u.prototype.CircleEvent=function(){this.arc=null,this.rbLeft=null,this.rbNext=null,this.rbParent=null,this.rbPrevious=null,this.rbRed=!1,this.rbRight=null,this.site=null,this.x=this.y=this.ycenter=0};u.prototype.attachCircleEvent=function(e){var t=e.rbPrevious,r=e.rbNext;if(!(!t||!r)){var i=t.site,s=e.site,f=r.site;if(i!==f){var n=s.x,a=s.y,l=i.x-n,h=i.y-a,c=f.x-n,o=f.y-a,p=2*(l*o-h*c);if(!(p>=-2e-12)){var g=l*l+h*h,b=c*c+o*o,d=(o*g-h*b)/p,y=(l*b-c*g)/p,R=y+a,v=this.circleEventJunkyard.pop();v||(v=new this.CircleEvent),v.arc=e,v.site=s,v.x=d+n,v.y=R+this.sqrt(d*d+y*y),v.ycenter=R,e.circleEvent=v;for(var E=null,x=this.circleEvents.root;x;)if(v.y<x.y||v.y===x.y&&v.x<=x.x)if(x.rbLeft)x=x.rbLeft;else{E=x.rbPrevious;break}else if(x.rbRight)x=x.rbRight;else{E=x;break}this.circleEvents.rbInsertSuccessor(E,v),E||(this.firstCircleEvent=v)}}}};u.prototype.detachCircleEvent=function(e){var t=e.circleEvent;t&&(t.rbPrevious||(this.firstCircleEvent=t.rbNext),this.circleEvents.rbRemoveNode(t),this.circleEventJunkyard.push(t),e.circleEvent=null)};u.prototype.connectEdge=function(e,t){var r=e.vb;if(r)return!0;var i=e.va,s=t.xl,f=t.xr,n=t.yt,a=t.yb,l=e.lSite,h=e.rSite,c=l.x,o=l.y,p=h.x,g=h.y,b=(c+p)/2,d=(o+g)/2,y,R;if(this.cells[l.voronoiId].closeMe=!0,this.cells[h.voronoiId].closeMe=!0,g!==o&&(y=(c-p)/(g-o),R=d-y*b),y===void 0){if(b<s||b>=f)return!1;if(c>p){if(!i||i.y<n)i=this.createVertex(b,n);else if(i.y>=a)return!1;r=this.createVertex(b,a)}else{if(!i||i.y>a)i=this.createVertex(b,a);else if(i.y<n)return!1;r=this.createVertex(b,n)}}else if(y<-1||y>1)if(c>p){if(!i||i.y<n)i=this.createVertex((n-R)/y,n);else if(i.y>=a)return!1;r=this.createVertex((a-R)/y,a)}else{if(!i||i.y>a)i=this.createVertex((a-R)/y,a);else if(i.y<n)return!1;r=this.createVertex((n-R)/y,n)}else if(o<g){if(!i||i.x<s)i=this.createVertex(s,y*s+R);else if(i.x>=f)return!1;r=this.createVertex(f,y*f+R)}else{if(!i||i.x>f)i=this.createVertex(f,y*f+R);else if(i.x<s)return!1;r=this.createVertex(s,y*s+R)}return e.va=i,e.vb=r,!0};u.prototype.clipEdge=function(e,t){var r=e.va.x,i=e.va.y,s=e.vb.x,f=e.vb.y,n=0,a=1,l=s-r,h=f-i,c=r-t.xl;if(l===0&&c<0)return!1;var o=-c/l;if(l<0){if(o<n)return!1;o<a&&(a=o)}else if(l>0){if(o>a)return!1;o>n&&(n=o)}if(c=t.xr-r,l===0&&c<0)return!1;if(o=c/l,l<0){if(o>a)return!1;o>n&&(n=o)}else if(l>0){if(o<n)return!1;o<a&&(a=o)}if(c=i-t.yt,h===0&&c<0)return!1;if(o=-c/h,h<0){if(o<n)return!1;o<a&&(a=o)}else if(h>0){if(o>a)return!1;o>n&&(n=o)}if(c=t.yb-i,h===0&&c<0)return!1;if(o=c/h,h<0){if(o>a)return!1;o>n&&(n=o)}else if(h>0){if(o<n)return!1;o<a&&(a=o)}return n>0&&(e.va=this.createVertex(r+n*l,i+n*h)),a<1&&(e.vb=this.createVertex(r+a*l,i+a*h)),(n>0||a<1)&&(this.cells[e.lSite.voronoiId].closeMe=!0,this.cells[e.rSite.voronoiId].closeMe=!0),!0};u.prototype.clipEdges=function(e){for(var t=this.edges,r=t.length,i,s=Math.abs;r--;)i=t[r],(!this.connectEdge(i,e)||!this.clipEdge(i,e)||s(i.va.x-i.vb.x)<1e-9&&s(i.va.y-i.vb.y)<1e-9)&&(i.va=i.vb=null,t.splice(r,1))};u.prototype.closeCells=function(e){for(var t=e.xl,r=e.xr,i=e.yt,s=e.yb,f=this.cells,n=f.length,a,l,h,c,o,p,g,b,d,y=Math.abs;n--;)if(a=f[n],!!a.prepareHalfedges()&&!!a.closeMe){for(h=a.halfedges,c=h.length,l=0;l<c;){if(p=h[l].getEndpoint(),b=h[(l+1)%c].getStartpoint(),y(p.x-b.x)>=1e-9||y(p.y-b.y)>=1e-9)switch(!0){case(this.equalWithEpsilon(p.x,t)&&this.lessThanWithEpsilon(p.y,s)):if(d=this.equalWithEpsilon(b.x,t),g=this.createVertex(t,d?b.y:s),o=this.createBorderEdge(a.site,p,g),l++,h.splice(l,0,this.createHalfedge(o,a.site,null)),c++,d)break;p=g;case(this.equalWithEpsilon(p.y,s)&&this.lessThanWithEpsilon(p.x,r)):if(d=this.equalWithEpsilon(b.y,s),g=this.createVertex(d?b.x:r,s),o=this.createBorderEdge(a.site,p,g),l++,h.splice(l,0,this.createHalfedge(o,a.site,null)),c++,d)break;p=g;case(this.equalWithEpsilon(p.x,r)&&this.greaterThanWithEpsilon(p.y,i)):if(d=this.equalWithEpsilon(b.x,r),g=this.createVertex(r,d?b.y:i),o=this.createBorderEdge(a.site,p,g),l++,h.splice(l,0,this.createHalfedge(o,a.site,null)),c++,d)break;p=g;case(this.equalWithEpsilon(p.y,i)&&this.greaterThanWithEpsilon(p.x,t)):if(d=this.equalWithEpsilon(b.y,i),g=this.createVertex(d?b.x:t,i),o=this.createBorderEdge(a.site,p,g),l++,h.splice(l,0,this.createHalfedge(o,a.site,null)),c++,d||(p=g,d=this.equalWithEpsilon(b.x,t),g=this.createVertex(t,d?b.y:s),o=this.createBorderEdge(a.site,p,g),l++,h.splice(l,0,this.createHalfedge(o,a.site,null)),c++,d)||(p=g,d=this.equalWithEpsilon(b.y,s),g=this.createVertex(d?b.x:r,s),o=this.createBorderEdge(a.site,p,g),l++,h.splice(l,0,this.createHalfedge(o,a.site,null)),c++,d)||(p=g,d=this.equalWithEpsilon(b.x,r),g=this.createVertex(r,d?b.y:i),o=this.createBorderEdge(a.site,p,g),l++,h.splice(l,0,this.createHalfedge(o,a.site,null)),c++,d))break;default:throw"Voronoi.closeCells() > this makes no sense!"}l++}a.closeMe=!1}};u.prototype.quantizeSites=function(e){for(var t=this.\u03B5,r=e.length,i;r--;)i=e[r],i.x=Math.floor(i.x/t)*t,i.y=Math.floor(i.y/t)*t};u.prototype.recycle=function(e){if(e)if(e instanceof this.Diagram)this.toRecycle=e;else throw"Voronoi.recycleDiagram() > Need a Diagram object."};u.prototype.compute=function(e,t){var r=new Date;this.reset(),this.toRecycle&&(this.vertexJunkyard=this.vertexJunkyard.concat(this.toRecycle.vertices),this.edgeJunkyard=this.edgeJunkyard.concat(this.toRecycle.edges),this.cellJunkyard=this.cellJunkyard.concat(this.toRecycle.cells),this.toRecycle=null);var i=e.slice(0);i.sort(function(p,g){var b=g.y-p.y;return b||g.x-p.x});for(var s=i.pop(),f=0,n,a,l=this.cells,h;;)if(h=this.firstCircleEvent,s&&(!h||s.y<h.y||s.y===h.y&&s.x<h.x))(s.x!==n||s.y!==a)&&(l[f]=this.createCell(s),s.voronoiId=f++,this.addBeachsection(s),a=s.y,n=s.x),s=i.pop();else if(h)this.removeBeachsection(h.arc);else break;this.clipEdges(t),this.closeCells(t);var c=new Date,o=new this.Diagram;return o.cells=this.cells,o.edges=this.edges,o.vertices=this.vertices,o.execTime=c.getTime()-r.getTime(),this.reset(),o};var m={voronoi:new u,diagram:null,margin:.75,canvas:null,bbox:{xl:0,xr:window.innerWidth,yt:0,yb:window.innerHeight},sites:[],timeoutDelay:100,init:function(){this.canvas=document.getElementById("voronoiCanvas"),this.randomSites(1e3,!0)},clearSites:function(){this.compute([])},randomSites:function(e,t){var r=[];t||(r=this.sites.slice(0));for(var i=this.canvas.width*this.margin,s=this.canvas.height*this.margin,f=i,n=this.canvas.width-i*2,a=s,l=this.canvas.height-s*2,h=0;h<e;h++)r.push({x:self.Math.round((f+self.Math.random()*n)*10)/10,y:self.Math.round((a+self.Math.random()*l)*10)/10});this.compute(r),this.timeout&&(clearTimeout(this.timeout),this.timeout=null);var c=this;this.timeout=setTimeout(function(){c.relaxSites()},this.timeoutDelay)},relaxSites:function(){if(!!this.diagram){for(var e=this.diagram.cells,t=e.length,r,i,s=[],f=!1,n,a,l=1/t*.1;t--;)r=e[t],n=Math.random(),!(n<l)&&(i=this.cellCentroid(r),a=this.distance(i,r.site),f=f||a>1,a>2&&(i.x=(i.x+r.site.x)/2,i.y=(i.y+r.site.y)/2),n>1-l&&(a/=2,s.push({x:i.x+(i.x-r.site.x)/a,y:i.y+(i.y-r.site.y)/a})),s.push(i));if(this.compute(s),f){var h=this;this.timeout=setTimeout(function(){h.relaxSites()},this.timeoutDelay)}}},distance:function(e,t){var r=e.x-t.x,i=e.y-t.y;return Math.sqrt(r*r+i*i)},cellArea:function(e){for(var t=0,r=e.halfedges,i=r.length,s,f,n;i--;)s=r[i],f=s.getStartpoint(),n=s.getEndpoint(),t+=f.x*n.y,t-=f.y*n.x;return t/=2,t},cellCentroid:function(e){for(var t=0,r=0,i=e.halfedges,s=i.length,f,n,a,l;s--;)f=i[s],a=f.getStartpoint(),l=f.getEndpoint(),n=a.x*l.y-l.x*a.y,t+=(a.x+l.x)*n,r+=(a.y+l.y)*n;return n=this.cellArea(e)*6,{x:t/n,y:r/n}},compute:function(e){this.sites=e,this.voronoi.recycle(this.diagram),this.diagram=this.voronoi.compute(e,this.bbox),this.updateStats(),this.render()},updateStats:function(){if(!!this.diagram){var e=document.getElementById("voronoiStats");!e||(e.innerHTML="("+this.diagram.cells.length+" Voronoi cells computed from "+this.diagram.cells.length+" Voronoi sites in "+this.diagram.execTime+" ms – rendering <i>not</i> included)")}},render:function(){var e=this.canvas.getContext("2d");if(e.globalAlpha=1,e.beginPath(),e.rect(0,0,this.canvas.width,this.canvas.height),e.fillStyle="white",e.fill(),e.strokeStyle="white",e.stroke(),!this.diagram)return;let t=this.diagram.cells;for(let i=0;i<t.length;i++){let s=t[i];if(s){let f=s.halfedges,n=f.length;if(n>2){let a=f[0].getStartpoint();e.beginPath(),e.moveTo(a.x,a.y);for(let l=0;l<n;l++)a=f[l].getEndpoint(),e.lineTo(a.x,a.y);e.fillStyle="transparent",e.fill(),e.lineWidth=1,e.strokeStyle="#71717a",e.stroke()}var r="#71717a";r&&r!="transparent"&&(e.beginPath(),e.fillStyle=r,e.arc(s.site.x,s.site.y,3,0,2*Math.PI),e.fill())}}}},T={commitHeight({state:e,commit:t}){t("setHeight",w())},commitWidth({state:e,commit:t}){t("setWidth",L())},commitToggle({state:e,commit:t}){if(t("setDisplay"),t("setHeight",w()),t("setWidth",L()),!e.display){m.clearSites();return}setTimeout(()=>{m.bbox.xr=window.innerWidth+10,m.bbox.yb=window.innerHeight+10,m.init()},100)}},V={namespaced:!0,state:I,getters:H,actions:T,mutations:W},M=()=>({display:!1}),N={setDisplay(e){e.display=!e.display}},q={getDisplay(e){return e.display}},J={commitToggle({state:e,commit:t}){t("setDisplay")}},D={namespaced:!0,state:M,getters:q,actions:J,mutations:N},A=()=>({widgetIds:[]}),$={setWidgetId(e,t){e.widgetIds.push(t)}},F={getWidgetIds(e){return e.widgetIds}},_={commitWidgetId({state:e,commit:t},r){t("setWidgetId",r)}},j={namespaced:!0,state:A,getters:F,actions:_,mutations:$};const z=!0;var K=P({state:k,mutations:B,getters:C,actions:S,modules:{search:V,mobile:D,recaptcha:j},strict:z});export{K as s};