2 lines
134 KiB
JavaScript
2 lines
134 KiB
JavaScript
|
import{_ as e,o,c as r,w as t,d as s,g as a,au as c,i as n,t as d,h as l,n as i,F as k,a3 as B,j as u,ag as m,p as f,r as C}from"./index-22d2df30.js";import{s as w}from"./scan.9bf28f6f.js";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function h(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var P,v={};"undefined"!=typeof self&&self,P=function(){return function(e){var o={};function r(t){if(o[t])return o[t].exports;var s=o[t]={i:t,l:!1,exports:{}};return e[t].call(s.exports,s,s.exports,r),s.l=!0,s.exports}return r.m=e,r.c=o,r.d=function(e,o,t){r.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:t})},r.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(o,"a",o),o},r.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},r.p="",r(r.s=3)}([function(e,o,r){Object.defineProperty(o,"__esModule",{value:!0});var t=function(){function e(e,o){this.width=o,this.height=e.length/o,this.data=e}return e.createEmpty=function(o,r){return new e(new Uint8ClampedArray(o*r),o)},e.prototype.get=function(e,o){return!(e<0||e>=this.width||o<0||o>=this.height||!this.data[o*this.width+e])},e.prototype.set=function(e,o,r){this.data[o*this.width+e]=r?1:0},e.prototype.setRegion=function(e,o,r,t,s){for(var a=o;a<o+t;a++)for(var c=e;c<e+r;c++)this.set(c,a,!!s)},e}();o.BitMatrix=t},function(e,o,r){Object.defineProperty(o,"__esModule",{value:!0});var t=r(2);o.addOrSubtractGF=function(e,o){return e^o};var s=function(){function e(e,o,r){this.primitive=e,this.size=o,this.generatorBase=r,this.expTable=new Array(this.size),this.logTable=new Array(this.size);for(var s=1,a=0;a<this.size;a++)this.expTable[a]=s,(s*=2)>=this.size&&(s=(s^this.primitive)&this.size-1);for(a=0;a<this.size-1;a++)this.logTable[this.expTable[a]]=a;this.zero=new t.default(this,Uint8ClampedArray.from([0])),this.one=new t.default(this,Uint8ClampedArray.from([1]))}return e.prototype.multiply=function(e,o){return 0===e||0===o?0:this.expTable[(this.logTable[e]+this.logTable[o])%(this.size-1)]},e.prototype.inverse=function(e){if(0===e)throw new Error("Can't invert 0");return this.expTable[this.size-this.logTable[e]-1]},e.prototype.buildMonomial=function(e,o){if(e<0)throw new Error("Invalid monomial degree less than 0");if(0===o)return this.zero;var r=new Uint8ClampedArray(e+1);return r[0]=o,new t.default(this,r)},e.prototype.log=function(e){if(0===e)throw new Error("Can't take log(0)");return this.logTable[e]},e.prototype.exp=function(e){return this.expTable[e]},e}();o.default=s},function(e,o,r){Object.defineProperty(o,"__esModule",{value:!0});var t=r(1),s=function(){function e(e,o){if(0===o.length)throw new Error("No coefficients.");this.field=e;var r=o.length;if(r>1&&0===o[0]){for(var t=1;t<r&&0===o[t];)t++;if(t===r)this.coefficients=e.zero.coefficients;else{this.coefficients=new Uint8ClampedArray(r-t);for(var s=0;s<this.coefficients.length;s++)this.coefficients[s]=o[t+s]}}else this.coefficients=o}return e.prototype.degree=function(){return this.coefficients.length-1},e.prototype.isZero=function(){return 0===this.coefficients[0]},e.prototype.getCoefficient=function(e){return this.coefficients[this.coefficients.length-1-e]},e.prototype.addOrSubtract=function(o){var r;if(this.isZero())return o;if(o.isZero())return this;var s=this.coefficients,a=o.coefficients;s.length>a.length&&(s=(r=[a,s])[0],a=r[1]);for(var c=new Uint8ClampedArray(a.length),n=a.length-s.length,d=0;d<n;d++)c[d]=a[d];for(d=n;d<a.length;d++)c[d]=t.addOrSubtractGF(s[d-n],a[d]);return new e(this.field,c)},e.prototype.multiply=function(o){if(0===o)return this.field.zero;if(1===o)return this;for(var r=this.coefficients.length,t=new Uint8ClampedArray(r),s=0;s<r;s++)t[s]=this.field.multiply(this.coefficients[s],o);return new e(this.field,t)},e.prototype.multiplyPoly=function(o){if(this.isZero()||o.isZero())return this.field.zero;for(var r=this.coefficients,s=r.length,a=o.coefficients,c=a.length,n=new Uint8ClampedArray(s+c-1),
|