memoscan
← all memos

Memo 0x74e336ec…8195ea on Ethereum

function f(e){for(var t=0;t<e.children.length;t++)c(e.children[t]);return u(e.region,!0)}for(s=0;s<i.children.length;s++)c(i.children[s]);return h.length<=0?{type:"Polygon",coordinates:[]}:1==h.length?{type:"Polygon",coordinates:h[0]}:{type:"MultiPolygon",coordinates:h}}};t.exports=n},{}],5:[function(e,t,r){var n=e("./linked-list");t.exports=function(e,t,r){function o(e,t,n){return{id:r?r.segmentId():-1,start:e,end:t,myFill:{above:n.myFill.above,below:n.myFill.below},otherFill:null}}var i=n.create();function l(e,r){i.insertBefore(e,(function(n){return function(e,r,n,o,i,l){var s=t.pointsCompare(r,i);return 0!==s?s:t.pointsSame(n,l)?0:e!==o?e?1:-1:t.pointAboveOrOnLine(n,o?i:l,o?l:i)?1:-1}(e.isStart,e.pt,r,n.isStart,n.pt,n.other.pt)<0}))}function s(e,t){var r=function(e,t){var r=n.node({isStart:!0,pt:e.start,seg:e,primary:t,other:null,status:null});return l(r,e.end),r}(e,t);return function(e,t,r){var o=n.node({isStart:!1,pt:t.end,seg:t,primary:r,other:e,status:null});e.other=o,l(o,e.pt)}(r,e,t),r}function a(e,t){var n=o(t,e.seg.end,e.seg);return function(e,t){r&&r.segmentChop(e.seg,t),e.other.remove(),e.seg.end=t,e.other.pt=t,l(e.other,e.pt)}(e,t),s(n,e.primary)}function u(o,l){var s=n.create();function u(e){return s.findTransition((function(r){var n,o,i,l,s,a;return(n=e,o=r.ev,i=n.seg.start,l=n.seg.end,s=o.seg.start,a=o.seg.end,t.pointsCollinear(i,s,a)?t.pointsCollinear(l,s,a)||t.pointAboveOrOnLine(l,s,a)?1:-1:t.pointAboveOrOnLine(i,s,a)?1:-1)>0}))}function h(e,n){var o=e.seg,i=n.seg,l=o.start,s=o.end,u=i.start,h=i.end;r&&r.checkIntersection(o,i);var c=t.linesIntersect(l,s,u,h);if(!1===c){if(!t.pointsCollinear(l,s,u))return!1;if(t.pointsSame(l,h)||t.pointsSame(s,u))return!1;var f=t.pointsSame(l,u),d=t.pointsSame(s,h);if(f&&d)return n;var p=!f&&t.pointBetween(l,u,h),g=!d&&t.pointBetween(s,u,h);if(f)return g?a(n,s):a(e,h),n;p&&(d||(g?a(n,s):a(e,h)),a(n,l))}else 0===c.alongA&&(-1===c.alongB?a(e,u):0===c.alongB?a(e,c.pt):1===c.alongB&&a(e,h)),0===c.alongB&&(-1===c.alongA?a(n,l):0===c.alongA?a(n,c.pt):1===c.alongA&&a(n,s));return!1}for(var c=[];!i.isEmpty();){var f=i.getHead();if(r&&r.vert(f.pt[0]),f.isStart){r&&r.segmentNew(f.seg,f.primary);var d=u(f),p=d.before?d.before.ev:null,g=d.after?d.after.ev:null;function y(){if(p){var e=h(f,p);if(e)return e}return!!g&&h(f,g)}r&&r.tempStatus(f.seg,!!p&&p.seg,!!g&&g.seg);var v,x=y();if(x){var b;if(e)(b=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below)&&(x.seg.myFill.above=!x.seg.myFill.above);else x.seg.otherFill=f.seg.myFill;r&&r.segmentUpdate(x.seg),f.other.remove(),f.remove()}if(i.getHead()!==f){r&&r.rewind(f.seg);continue}if(e)b=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below,f.seg.myFill.below=g?g.seg.myFill.above:o,f.seg.myFill.above=b?!f.seg.myFill.below:f.seg.myFill.below;else if(null===f.seg.otherFill)v=g?f.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:f.primary?l:o,f.seg.otherFill={above:v,below:v};r&&r.status(f.seg,!!p&&p.seg,!!g&&g.seg),f.other.status=d.insert(n.node({ev:f}))}else{var m=f.status;if(null===m)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(s.exists(m.prev)&&s.exists(m.next)&&h(m.prev.ev,m.next.ev),r&&r.statusRemove(m.ev.seg),m.remove(),!f.primary){var w=f.seg.myFill;f.seg.myFill=f.seg.otherFill,f.seg.otherFill=w}c.push(f.seg)}i.getHead().remove()}return r&&r.done(),c}return e?{addRegion:function(e){for(var n,o,i,l=e[e.length-1],a=0;a<e.length;a++){n=l,l=e[a];var u=t.pointsCompare(n,l);0!==u&&s((o=u<0?n:l,i=u<0?l:n,{id:r?r.segmentId():-1,start:o,end:i,myFill:{above:null,below:null},otherFill:null}),!0)}},calculate:function(e){return u(e,!1)}}:{calculate:function(e,t,r,n){return e.forEach((function(e){s(o(e.start,e.end,e),!0)})),r.forEach((function(e){s(o(e.start,e.end,e),!1)})),u(t,n)}}}},{"./linked-list":6}],6:[function(e,t,r){t.exports={create:function(){var e={root:{root:!0,next:null},exists:function(t){return null!==t&&t!==e.root},isEmpty:function(){return null===e.root.next},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var n=e.root,o=e.root.next;null!==o;){if(r(o))return t.prev=o.prev,t.next=o,o.prev.next=t,void(o.prev=t);n=o,o=o.next}n.next=t,t.prev=n,t.next=null},findTransition:function(t){for(var r=e.root,n=e.root.next;null!==n&&!t(n);)r=n,n=n.next;return{before:r===e.root?null:r,after:n,insert:function(e){return e.prev=r,e.next=n,r.next=e,null!==n&&(n.prev=e),e}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}}},{}],7:[function(e,t,r){t.exports=function(e,t,r){var n=[],o=[];return e.forEach((function(e){var i=e.start,l=e.end;if(!t.pointsSame(i,l)){r&&r.chainStart(e);for(var s={index:0,matches_head:!1,matches_pt1:!1},a={index:0,matches_head:!1,matches_pt1:!1},u=s,h=0;h<n.length;h++){var c=(y=n[h])[0],f=(y[1],y[y.length-1]);y[y.length-2];if(t.pointsSame(c,i)){if(C(h,!0,!0))break}else if(t.pointsSame(c,l)){if(C(h,!0,!1))break}else if(t.pointsSame(f,i)){if(C(h,!1,!0))break}else if(t.pointsSame(f,l)&&C(h,!1,!1))break}if(u===s)return n.push([i,l]),void(r&&r.chainNew(i,l));if(u===a){r&&r.chainMatch(s.index);var d=s.index,p=s.matches_pt1?l:i,g=s.matches_head,y=n[d],v=g?y[0]:y[y.length-1],x=g?y[1]:y[y.length-2],b=g?y[y.length-1]:y[0],m=g?y[y.length-2]:y[1];return t.pointsCollinear(x,v,p)&&(g?(r&&r.chainRemoveHead(s.index,p),y.shift()):(r&&r.chainRemoveTail(s.index,p),y.pop()),v=x),t.pointsSame(b,p)?(n.splice(d,1),t.pointsCollinear(m,b,v)&&(g?(r&&r.chainRemoveTail(s.index,v),y.pop()):(r&&r.chainRemoveHead(s.index,v),y.shift())),r&&r.chainClose(s.index),void o.push(y)):void(g?(r&&r.chainAddHead(s.index,p),y.unshift(p)):(r&&r.chainAddTail(s.index,p),y.push(p)))}var w=s.index,P=a.index;r&&r.chainConnect(w,P);var R=n[w].length<n[P].length;s.matches_head?a.matches_head?R?(E(w),B(w,P)):(E(P),B(P,w)):B(P,w):a.matches_head?B(w,P):R?(E(w),B(P,w)):(E(P),B(w,P))}function C(e,t,r){return u.index=e,u.matches_head=t,u.matches_pt1=r,u===s?(u=a,!1):(u=null,!0)}function E(e){r&&r.chainReverse(e),n[e].reverse()}function B(e,o){var i=n[e],l=n[o],s=i[i.length-1],a=i[i.length-2],u=l[0],h=l[1];t.pointsCollinear(a,s,u)&&(r&&r.chainRemoveTail(e,s),i.pop(),s=a),t.pointsCollinear(s,u,h)&&(r&&r.chainRemoveHead(o,u),l.shift()),r&&r.chainJoin(e,o),n[e]=i.concat(l),n.splice(o,1)}})),o}},{}],8:[function(e,t,r){function n(e,t,r){var n=[];return e.forEach((function(e){var o=(e.myFill.above?8:0)+(e.myFill.below?4:0)+(e.otherFill&&e.otherFill.above?2:0)+(e.otherFill&&e.otherFill.below?1:0);0!==t[o]&&n.push({id:r?r.segmentId():-1,start:e.start,end:e.end,myFill:{above:1===t[o],below:2===t[o]},otherFill:null})})),r&&r.selected(n),n}var o={union:function(e,t){return n(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return n(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return n(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return n(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return n(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};t.exports=o},{}]},{},[1]),function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.pa?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Offset=e()}((function(){return function e(t,r,n){function o(l,s){if(!r[l]){if(!t[l]){var a="function"==typeof require&&require;if(!s&&a)return a(l,!0);if(i)return i(l,!0);throw(a=Error("Cannot find module '"+l+"'")).code="MODULE_NOT_FOUND",a}a=r[l]={exports:{}},t[l][0].call(a.exports,(function(e){var r=t[l][1][e];return o(r||e)}),a,a.exports,e,t,r,n)}return r[l].exports}for(var i="function"==typeof require&&require,l=0;l<n.length;l++)o(n[l]);return o}({1:[function(e,t){t.exports={ca:e("./lib/rbtree"),ka:e("./lib/bintree")}},{"./lib/bintree":2,"./lib/rbtree":3}],2:[function(e,t){function r(e){this.data=e,this.right=this.left=null}function n(e){this.c=null,this.s=e,this.size=0}var o=e("./treebase");r.prototype.g=function(e){return e?this.right:this.left},r.prototype.l=function(e,t){e?this.right=t:this.left=t},n.prototype=new o,n.prototype.W=function(e){if(null===this.c)return this.c=new r(e),this.size++,!0;for(var t=0,n=null,o=this.c;;){if(null===o)return o=new r(e),n.l(t,o),ret=!0,this.size++,!0;if(0===this.s(o.data,e))return!1;t=0>this.s(o.data,e),n=o,o=o.g(t)}},n.prototype.remove=function(e){if(null===this.c)return!1;var t=new r(void 0);(l=t).right=this.c;for(var n=null,o=null,i=1;null!==l.g(i);){n=l;var l=l.g(i),s=this.s(e,l.data);i=0<s;0===s&&(o=l)}return null!==o&&(o.data=l.data,n.l(n.right===l,l.g(null===l.left)),this.c=t.right,this.size--,!0)},t.exports=n},{"./treebase":4}],3:[function(e,t){function r(e){this.data=e,this.right=this.left=null,this.red=!0}function n(e){this.c=null,this.s=e,this.size=0}function o(e){return null!==e&&e.red}function i(e,t){var r=e.g(!t);return e.l(!t,r.g(t)),r.l(t,e),e.red=!0,r.red=!1,r}function l(e,t){return e.l(!t,i(e.g(!t),!t)),i(e,t)}var s=e("./treebase");r.prototype.g=function(e){return e?this.right:this.left},r.prototype.l=function(e,t){e?this.right=t:this.left=t},n.prototype=new s,n.prototype.W=function(e){var t=!1;if(null===this.c)this.c=new r(e),t=!0,this.size++;else{var n=new r(void 0),s=0,a=0,u=null,h=n,c=null,f=this.c;for(h.right=this.c;;){if(null===f?(f=new r(e),c.l(s,f),t=!0,this.size++):o(f.left)&&o(f.right)&&(f.red=!0,f.left.red=!1,f.right.red=!1),o(f)&&o(c)){var d=h.right===u;f===c.g(a)?h.l(d,i(u,!a)):h.l(d,l(u,!a))}if(0===(d=this.s(f.data,e)))break;a=s,s=0>d,null!==u&&(h=u),u=c,c=f,f=f.g(s)}this.c=n.right}return this.c.red=!1,t},n.prototype.remove=function(e){if(null===this.c)return!1;var t=new r(void 0);(c=t).right=this.c;for(var n,s=null,a=null,u=1;null!==c.g(u);){var h=u;n=s;s=c;var c=c.g(u),f=this.s(e,c.data);u=0<f;if(0===f&&(a=c),!o(c)&&!o(c.g(u)))if(o(c.g(!u)))n=i(c,u),s.l(h,n),s=n;else if(!o(c.g(!u))&&null!==(f=s.g(!h)))if(o(f.g(!h))||o(f.g(h))){var d=n.right===s;o(f.g(h))?n.l(d,l(s,h)):o(f.g(!h))&&n.l(d,i(s,h)),(h=n.g(d)).red=!0,c.red=!0,h.left.red=!1,h.right.red=!1}else s.red=!1,f.red=!0,c.red=!0}return null!==a&&(a.data=c.data,s.l(s.right===c,c.g(null===c.left)),this.size--),this.c=t.right,null!==this.c&&(this.c.red=!1),null!==a},t.exports=n},{"./treebase":4}],4:[function(e,t){function r(){}function n(e){this.V=e,this.i=[],this.f=null}r.prototype.clear=function(){this.c=null,this.size=0},r.prototype.find=function(e){for(var t=this.c;null!==t;){var r=this.s(e,t.data);if(0===r)return t.data;t=t.g(0<r)}return null},r.prototype.w=function(e){for(var t=this.c,r=this.iterator();null!==t;){var n=this.s(e,t.data);if(0===n)return r.f=t,r;r.i.push(t),t=t.g(0<n)}return null},r.prototype.lowerBound=function(e){for(var t=this.c,r=this.iterator(),n=this.s;null!==t;){var o=n(e,t.data);if(0===o)return r.f=t,r;r.i.push(t),t=t.g(0<o)}for(o=r.i.length-1;0<=o;--o)if(0>n(e,(t=r.i[o]).data))return r.f=t,r.i.length=o,r;return r.i.length=0,r},r.prototype.upperBound=function(e){for(var t=this.lowerBound(e),r=this.s;null!==t.data()&&0===r(t.data(),e);)t.next();return t},r.prototype.min=function(){var e=this.c;if(null===e)return null;for(;null!==e.left;)e=e.left;return e.data},r.prototype.max=function(){var e=this.c;if(null===e)return null;for(;null!==e.right;)e=e.right;return e.data},r.prototype.iterator=function(){return new n(this)},n.prototype.data=function(){return null!==this.f?this.f.data:null},n.prototype.next=function(){if(null===this.f){var e=this.V.c;null!==e&&this.S(e)}else if(null===this.f.right)do{if(e=this.f,!this.i.length){this.f=null;break}this.f=this.i.pop()}while(this.f.right===e);else this.i.push(this.f),this.S(this.f.right);return null!==this.f?this.f.data:null},n.prototype.F=function(){if(null===this.f){var e=this.V.c;null!==e&&this.R(e)}else if(null===this.f.left)do{if(e=this.f,!this.i.length){this.f=null;break}this.f=this.i.pop()}while(this.f.left===e);else this.i.push(this.f),this.R(this.f.left)},n.prototype.S=function(e){for(;null!==e.left;)this.i.push(e),e=e.left;this.f=e},n.prototype.R=function(e){for(;null!==e.right;)this.i.push(e),e=e.right;this.f=e},t.exports=r},{}],5:[function(e,t){t.exports=e("./src/index")},{"./src/index":10}],6:[function(e,t){var r=e("./signed_area");e("./equals"),t.exports=function(e,t){var n=e.a,o=t.a;return n[0]>o[0]?1:n[0]<o[0]?-1:n[1]!==o[1]?n[1]>o[1]?1:-1:e.left!==t.left?e.left?1:-1:0!==r(n,e.b.a,t.b.a)?e.H(t.b.a)?-1:1:!e.j&&t.j?1:-1}},{"./equals":9,"./signed_area":12}],7:[function(e,t){var r=e("./signed_area"),n=e("./compare_events"),o=e("./equals");t.exports=function(e,t){return e===t?0:0!==r(e.a,e.b.a,t.a)||0!==r(e.a,e.b.a,t.b.a)?o(e.a,t.a)?e.H(t.b.a)?-1:1:e.a[0]===t.a[0]?e.a[1]<t.a[1]?-1:1:1===n(e,t)?t.ia(e.a)?-1:1:e.H(t.a)?-1:1:e.j!==t.j?e.j?-1:1:o(e.a,t.a)?o(e.b.a,t.b.a)?0:e.m>t.m?1:-1:1===n(e,t)?1:-1}},{"./compare_events":6,"./equals":9,"./signed_area":12}],8:[function(e,t){t.exports={M:0,ba:1,N:2,L:3}},{}],9:[function(e,t){t.exports=function(e,t){return e[0]===t[0]&&e[1]===t[1]}},{}],10:[function(e,t){function r(e,t,n,o,i){var l,s;if("number"==typeof e[0][0])for(l=0,s=e.length-1;l<s;l++){var a=e[l],u=e[l+1],h=t,c=n+1,f=o,d=i,p=new g(a,!1,void 0,h);u=new g(u,!1,p,h);p.b=u,p.m=u.m=c,0<y(p,u)?u.left=!0:p.left=!0,d[0]=w(d[0],a[0]),d[1]=w(d[1],a[1]),d[2]=m(d[2],a[0]),d[3]=m(d[3],a[1]),f.push(p),f.push(u)}else for(l=0,s=e.length;l<s;l++)P++,r(e[l],t,P,o,i)}function n(e,t,n,o){var i=new d(null,y);return P=0,r(e,!0,0,i,n),r(t,!1,0,i,o),i}function o(e,t,r,n){null===t?(e.v=!1,e.u=!0):e.j===t.j?(e.v=!t.v,e.u=t.u):(e.v=!t.u,e.u=t.Y()?!t.v:t.v),t&&(e.G=!i(t,n)||t.Y()?t.G:t),e.K=i(e,n)}function i(e,t){switch(e.type){case f.M:switch(t){case 0:return!e.u;case 1:return e.u;case 2:return e.j&&e.u||!e.j&&!e.u;case 3:return!0}case f.N:return 0===t||1===t;case f.L:return 2===t}return!1}function l(e,t,r){var n=(o=x(e.a,e.b.a,t.a,t.b.a))?o.length:0;if(0===n||1===n&&(b(e.a,t.a)||b(e.b.a,t.b.a)))return 0;if(2===n&&e.j===t.j)return 0;if(1===n)return b(e.a,o[0])||b(e.b.a,o[0])||s(e,o[0],r),b(t.a,o[0])||b(t.b.a,o[0])||s(t,o[0],r),1;var o=[],i=n=!1;return b(e.a,t.a)?n=!0:1===y(e,t)?o.push(t,e):o.push(e,t),b(e.b.a,t.b.a)?i=!0:1===y(e.b,t.b)?o.push(t.b,e.b):o.push(e.b,t.b),n&&i||n?(e.type=f.ba,t.type=e.v===t.v?f.N:f.L,n&&!i&&s(o[0].b,o[1].a,r),2):i?(s(o[0],o[1].a,r),3):o[0]!==o[3].b?(s(o[0],o[1].a,r),s(o[1],o[2].a,r),3):(s(o[0],o[1].a,r),s(o[3].b,o[2].a,r),3)}function s(e,t,r){var n=new g(t,!1,e,e.j);return t=new g(t,!0,e.b,e.j),b(e.a,e.b.a)&&console.warn("Sides of the same polygon overlap",e),n.m=t.m=e.m,0<y(t,e.b)&&(e.b.left=!0,t.left=!1),e.b.b=t,e.b=n,r.push(t),r.push(n),r}function a(e,t,r,n,i,s){var a,u;r=new p(v),t=[];let h=0;for(i=w(n[2],i[2]);e.length;){if(h++,h>1e4){console.warn("Bad bug here");break}var c=e.pop();if(t.push(c),0===s&&c.a[0]>i||2===s&&c.a[0]>n[2])break;if(c.left){if(r.W(c),u=r.w(c),a=r.w(c),c.iterator=r.w(c),!a||!u){a=(d=r).iterator(),u=d.iterator();for(var f,d=d.iterator();null!==(f=d.next())&&(a.next(),u.next(),f!==event););a=(u=[a,u])[0],u=u[1]}a.data()!==r.min()?a.F():((a=r.iterator()).F(),a.next()),u.next(),o(c,a.data(),0,s),u.data()&&2===l(c,u.data(),e)&&(o(c,a.data(),0,s),o(c,u.data(),0,s)),a.data()&&2===l(a.data(),c,e)&&((u=r.w(a.data())).data()!==r.min()?u.F():(u=r.w(r.max())).next(),o(a.data(),u.data(),0,s),o(c,a.data(),0,s))}else c=c.b,u=r.w(c),(a=r.w(c))&&u&&(a.data()!==r.min()?a.F():((a=r.iterator()).F(),a.next()),u.next(),r.remove(c),u.data()&&a.data()&&l(a.data(),u.data(),e))}return t}function u(e,t){"[object Array]"===Object.prototype.toString.call(e[0][0])||(e=[e]),e[t]=[]}function h(e,t,r){var o,i=null;if(0==e.length*t.length&&(0===r?i=c:2===r?i=e:1!==r&&3!==r||(i=0===e.length?t:e)),o=i)return o===c?null:o;var l=[1/0,1/0,-1/0,-1/0],s=n(e,t,i=[1/0,1/0,-1/0,-1/0],l);if(o=null,(i[0]>l[2]||l[0]>i[2]||i[1]>l[3]||l[1]>i[3])&&(0===r?o=c:2===r?o=e:1!==r&&3!==r||(o=e.concat(t))),o)return o===c?null:o;for(e=[],t=0,r=(i=a(s,0,0,i,l,r)).length;t<r;t++)event=i[t],(event.left&&event.K||!event.left&&event.b.K)&&e.push(event);let h=0;for(i=!1;!i&&(h++,!(h>2e3));){for(i=!0,t=0,r=e.length;t<r;t++)t+1<r&&1===y(e[t],e[t+1])&&(l=t+1,s=(i=e)[t],i[t]=i[l],i[l]=s,i=!1);t=0}for(r=e.length;t<r;t++)e[t].A=t;for(t=0,r=e.length;t<r;t++)e[t].left||(i=e[t].A,e[t].A=e[t].b.A,e[t].b.A=i);i=Array(e.length),l=[],s=[],o=[];var f={};for(t=0,r=e.length;t<r;t++)if(!i[t]){var d=[];l.push(d);var p=l.length-1;if(s.push(0),o.push(-1),e[t].G){var g=e[t].G.m;e[t].G.I?f[g]&&(u(l[o[g]],p),o[p]=o[g],s[p]=s[g],f[p]=!0):(u(l[g],p),o[p]=g,s[p]=s[g]+1,f[p]=!0)}for(g=t,d.push(e[t].a);g>=t;){i[g]=!0,e[g].left?(e[g].I=!1,e[g].m=p):(e[g].b.I=!0,e[g].b.m=p),i[g=e[g].A]=!0,d.push(e[g].a);e:{for(var v=e,x=i,m=g+1,w=v.length;m<w&&b(v[m].a,v[g].a);){if(!x[m]){g=m;break e}m+=1}for(m=g-1;x[m];)--m;g=m}}i[g=-1===g?t:g]=i[e[g].A]=!0,e[g].b.I=!0,e[g].b.m=p,1&s[p]&&d.reverse()}return l}var c=[],f=e("./edge_type"),d=e("tinyqueue"),p=e("bintrees").ca,g=e("./sweep_event"),y=e("./compare_events"),v=e("./compare_segments"),x=e("./segment_intersection"),b=e("./equals"),m=Math.max,w=Math.min,P=0;t.exports=h,t.exports.union=function(e,t){return h(e,t,1)},t.exports.diff=function(e,t){return h(e,t,2)},t.exports.wa=function(e,t){return h(e,t,3)},t.exports.intersection=function(e,t){return h(e,t,0)},t.exports.ta={ma:0,la:2,na:1,oa:3},t.exports.sa=n,t.exports.qa=o,t.exports.va=a,t.exports.ra=s,t.exports.ua=l},{"./compare_events":6,"./compare_segments":7,"./edge_type":8,"./equals":9,"./segment_intersection":11,"./sweep_event":13,bintrees:1,tinyqueue:14}],11:[function(e,t){function r(e,t){return e[0]*t[1]-e[1]*t[0]}function n(e,t){return e[0]*t[0]+e[1]*t[1]}t.exports=function(e,t,o,i,l){function s(e,t,r){return[e[0]+t*r[0],e[1]+t*r[1]]}t=[t[0]-e[0],t[1]-e[1]],i=[i[0]-o[0],i[1]-o[1]],o=[o[0]-e[0],o[1]-e[1]];var a=r(t,i),u=n(t,t);if(a*a>1e-9*u*n(i,i))return 0>(i=r(o,i)/a)||1<i||0>(o=r(o,t)/a)||1<o||l?null:[s(e,i,t)];var h=n(o,o);return(a=r(o,t))*a>1e-9*u*h?null:(a=(o=n(t,o)/u)+n(t,i)/u,i=Math.min(o,a),o=Math.max(o,a),1>=i&&0<=o?1===i?l?null:[s(e,0<i?i:0,t)]:0===o?l?null:[s(e,1>o?o:1,t)]:l&&0===i&&1===o?null:[s(e,0<i?i:0,t),s(e,1>o?o:1,t)]:null)}},{}],12:[function(e,t){t.exports=function(e,t,r){return(e[0]-r[0])*(t[1]-r[1])-(t[0]-r[0])*(e[1]-r[1])}},{}],13:[function(e,t){function r(e,t,r,n,i){this.left=t,this.a=e,this.b=r,this.j=n,this.type=i||o.M,this.u=this.v=!1,this.G=null,this.I=this.K=!1}var n=e("./signed_area"),o=e("./edge_type");r.prototype={H:function(e){return this.left?0<n(this.a,this.b.a,e):0<n(this.b.a,this.a,e)},ia:function(e){return!this.H(e)},Y:function(){return this.a[0]===this.b.a[0]}},t.exports=r},{"./edge_type":8,"./signed_area":12}],14:[function(e,t){function r(e,t){if(!(this instanceof r))return new r(e,t);if(this.data=e||[],this.length=this.data.length,this.compare=t||n,e)for(var o=Math.floor(this.length/2);0<=o;o--)this.O(o)}function n(e,t){return e<t?-1:e>t?1:0}t.exports=r,r.prototype={push:function(e){this.data.push(e),this.length++,this.ea(this.length-1)},pop:function(){var e=this.data[0];return this.data[0]=this.data[this.length-1],this.length--,this.data.pop(),this.O(0),e},ea:function(e){for(var t=this.data,r=this.compare;0<e;){var n=Math.floor((e-1)/2);if(!(0>r(t[e],t[n])))break;var o=t,i=o[n];o[n]=o[e],o[e]=i,e=n}},O:function(e){for(var t=this.data,r=this.compare,n=this.length;;){var o=2*e+1,i=o+1,l=e;if(o<n&&0>r(t[o],t[l])&&(l=o),i<n&&0>r(t[i],t[l])&&(l=i),l===e)break;i=(o=t)[l],o[l]=o[e],o[e]=i,e=l}}}},{}],15:[function(e,t){function r(e,t){this.current=e,this.next=t,this.P=this.X(),this.T=this.ja()}r.prototype.ja=function(){var e=this.X();return[-e[0],-e[1]]},r.prototype.X=function(){var e=this.next[0]-this.current[0],t=this.next[1]-this.current[1],r=Math.sqrt(e*e+t*t);if(0===r)throw Error("Vertices overlap");return[-t/r,e/r]},r.prototype.offset=function(e,t){return r.Z(this.current,this.next,e,t)},r.prototype.ha=function(e,t){return r.Z(this.next,this.current,e,t)},r.Z=function(e,t,n,o){return new r([e[0]+n,e[1]+o],[t[0]+n,t[1]+o])},r.prototype.inverse=function(){return new r(this.next,this.current)},t.exports=r},{}],16:[function(e,t){function r(e,t){this.h=null,this.o=0,e&&this.data(e),this.J=void 0!==t?t:5}var n=e("./edge"),o=e("martinez-polygon-clipping"),i=e("./utils"),l=i.isArray,s=i.ga,a=i.aa;r.prototype.data=function(e){if(this.B=[],!l(e))throw Error("Offset requires at least one coodinate to work with");return l(e)&&"number"==typeof e[0]?this.h=e:(this.h=a(e),this.U(this.h,this.B)),this},r.prototype.getMartinez=function(){return o},r.prototype.U=function(e,t){var r,o;if(l(e[0])&&"number"==typeof e[0][0])for(o=e.length,s(e[0],e[o-1])&&--o,r=0;r<o;r++)t.push(new n(e[r],e[(r+1)%o]));else for(r=0,o=e.length;r<o;r++)t.push([]),this.U(e[r],t[t.length-1])},r.prototype.arcSegments=function(e){return this.J=e,this},r.prototype.fa=function(e,t,r,n,o,i){var l=2*Math.PI,s=Math.atan2(n[1]-t[1],n[0]-t[0]),a=Math.atan2(o[1]-t[1],o[0]-t[0]);for(0==i%2&&--i,0>s&&(s+=l),0>a&&(a+=l),l=-(s>a?s-a:s+l-a)/i,e.push(n),a=1;a<i;++a)n=s+l*a,e.push([t[0]+Math.cos(n)*r,t[1]+Math.sin(n)*r]);e.push(o)},r.prototype.distance=function(e){return this.o=e||0,this},r.degreesToUnits=function(e,t){switch(t){case"miles":e/=69.047;break;case"feet":e/=364568;break;case"kilometers":e/=111.12;break;case"meters":case"metres":e/=111120}return e},r.prototype.C=function(e){return s(e[0],e[e.length-1])||e.push([e[0][0],e[0][1]]),e},r.prototype.offset=function(e){return this.distance(e),0===this.o?this.h:0<this.o?this.margin(this.o):this.padding(-this.o)},r.prototype.da=function(e,t,r,n){var o=[];r=[r.offset(r.P[0]*n,r.P[1]*n),r.ha(r.T[0]*n,r.T[1]*n)];for(var i=0;2>i;i++)this.fa(o,0===i?e:t,n,r[(i+2-1)%2].next,r[i].current,this.J);return o},r.prototype.margin=function(e){return this.distance(e),"number"==typeof this.h[0]?this.$(this.o):0===e?this.h:(e=this.offsetLines(this.o),e=o.union(this.h,e),a(e))},r.prototype.padding=function(e){return this.distance(e),0===this.o?this.C(this.h):2===this.h.length&&"number"==typeof this.h[0]?this.h:(e=this.offsetLines(this.o),e=o.diff(this.h,e),a(e))},r.prototype.offsetLines=function(e){if(0>e)throw Error("Cannot apply negative margin to the line");var t;if(this.distance(e),l(this.h[0])&&"number"!=typeof this.h[0][0]){e=0;for(var r=this.B.length;e<r;e++)t=0===e?this.D(this.h[e],this.B[e]):o.union(t,this.D(this.h[e],this.B[e]))}else t=1===this.h.length?this.$():this.D(this.h,this.B);return t},r.prototype.D=function(e,t){var r,n,i;if(l(e[0])&&"number"==typeof e[0][0])for(n=0,i=e.length-1;n<i;n++){var s=this.C(this.da(e[n],e[n+1],t[n],this.o));r=0===n?[this.C(s)]:o.union(r,this.C(s))}else for(n=0,i=t.length;n<i;n++)r=0===n?this.D(e[n],t[n]):o.union(r,this.D(e[n],t[n]));return r},r.prototype.$=function(e){this.distance(e),e=2*this.J;var t=[],r=this.h,n=this.o,o=0;0==e%2&&e++;for(var i=0;i<e;i++)o+=2*Math.PI/e,t.push([r[0]+n*Math.cos(o),r[1]+n*Math.sin(o)]);return a([this.C(t)])},r.aa=a,t.exports=r},{"./edge":15,"./utils":17,"martinez-polygon-clipping":5}],17:[function(e,t){var r=t.exports.isArray=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};t.exports.ga=function(e,t){return e[0]===t[0]&&e[1]===t[1]},t.exports.aa=function e(t,n,o){var i,l;if(n=n||0,r(t)&&"number"==typeof t[0][0]){for(i=n=0,l=t.length;i<l;i++){var s=t[i],a=t[(i+1)%l];n+=s[0]*a[1],n-=a[0]*s[1]}(!o&&0<n||o&&0>n)&&t.reverse()}else for(i=0,l=t.length;i<l;i++)e(t[i],n+1,0<i);return t}},{}]},{},[16])(16)})),function(){if(Le=performance.now(),!1===kr.isWebGL2Available())return document.body.appendChild(kr.getWebGL2ErrorMessage()),void(zt=!0);c&&function(e){let t;e%2==0?(tokenData.tokenId=100,t=0):(tokenData.tokenId=600,t=-1);let r=e+t,hash="0x";for(var n=0;n<64;n++)hash+=Math.floor(16*Te(r+n)).toString(16);tokenData.hash=hash}(Math.round(ke.e));let q=ke.r;null==q||isNaN(q)||(Y=q);let tokenId=tokenData.tokenId;subIdInt=tokenId%1e6,subIdInt>=500?(console.log("IRL mint: "+subIdInt),d=!0):(d=!1,console.log("Online mint: "+subIdInt)),0!=subIdInt&&500!=subIdInt||(tokenData.hash=Ce+Ee+Be),console.log(tokenData),u=new e,Fr(lr(0,64e3)),m=hr(lr(-1e3,1e3)),w=lr(0,2*F),f=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform),f&&(Y=.5),y=1800*Y,v=2700*Y,g=v/y,b=g,Q=[];for(let e=0;e<7;e++)Q.push(lr());if(h=new Offset,P=Math.pow(.007,2),W=new Vr,W.enqueue(ie),le+=ie,c){let e=document.createElement("a");