@rive-app/flutter-wasm
Advanced tools
Comparing version 6.0.0 to 7.0.0
@@ -11,4 +11,4 @@ | ||
var f;f||(f=typeof RiveText !== 'undefined' ? RiveText : {});var aa,r;f.ready=new Promise(function(a,b){aa=a;r=b}); | ||
RiveText.onRuntimeInitialized=function(){var a=RiveText.makeGlyphPath;RiveText.makeGlyphPath=function(d,e){d=a(d,e);e=d[1];var h=d[2];h=RiveText.HEAPU8.subarray(h,h+d[3]);let l=0;for(var g of h)switch(g){case 0:case 1:l++;break;case 2:l+=2;break;case 4:l+=3}g=e/4;return{rawPath:d[0],verbs:h,points:RiveText.HEAPF32.subarray(g,g+2*l)}};var b=RiveText.shapeText;RiveText.shapeText=function(d,e){d=b(d,e);return{rawResult:d,results:RiveText.HEAPU8.subarray(d)}};var c=RiveText.breakLines;RiveText.breakLines= | ||
function(d,e,h){d=c(d,e,h);return{rawResult:d,results:RiveText.HEAPU8.subarray(d)}}};var ba=Object.assign({},f),da="./this.program",ea="object"==typeof window,t="function"==typeof importScripts,fa="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,u="",ha,v,w; | ||
RiveText.onRuntimeInitialized=function(){var a=RiveText.makeGlyphPath;RiveText.makeGlyphPath=function(d,e){d=a(d,e);e=d[1];var g=d[2];g=RiveText.HEAPU8.subarray(g,g+d[3]);let l=0;for(var h of g)switch(h){case 0:case 1:l++;break;case 2:l+=2;break;case 4:l+=3}h=e/4;return{rawPath:d[0],verbs:g,points:RiveText.HEAPF32.subarray(h,h+2*l)}};var b=RiveText.shapeText;RiveText.shapeText=function(d,e){d=b(d,e);return{rawResult:d,results:RiveText.HEAPU8.subarray(d)}};var c=RiveText.breakLines;RiveText.breakLines= | ||
function(d,e,g){d=c(d,e,g);return{rawResult:d,results:RiveText.HEAPU8.subarray(d)}}};var ba=Object.assign({},f),da="./this.program",ea="object"==typeof window,t="function"==typeof importScripts,fa="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,u="",ha,v,w; | ||
if(fa){u=t?require("path").dirname(u)+"/":__dirname+"/";var fs,ia;"function"===typeof require&&(fs=require("fs"),ia=require("path"));ha=(a,b)=>{a=ia.normalize(a);return fs.readFileSync(a,b?void 0:"utf8")};w=a=>{a=ha(a,!0);a.buffer||(a=new Uint8Array(a));return a};v=(a,b,c)=>{a=ia.normalize(a);fs.readFile(a,function(d,e){d?c(d):b(e.buffer)})};1<process.argv.length&&(da=process.argv[1].replace(/\\/g,"/"));process.argv.slice(2);process.on("uncaughtException",function(a){throw a;});process.on("unhandledRejection", | ||
@@ -18,3 +18,3 @@ function(a){throw a;});f.inspect=function(){return"[Emscripten Module object]"}}else if(ea||t)t?u=self.location.href:"undefined"!=typeof document&&document.currentScript&&(u=document.currentScript.src),_scriptDir&&(u=_scriptDir),0!==u.indexOf("blob:")?u=u.substr(0,u.replace(/[?#].*/,"").lastIndexOf("/")+1):u="",ha=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},t&&(w=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}), | ||
var ka,la=!1,ma="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0; | ||
function na(a,b,c){var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16<c-b&&a.buffer&&ma)return ma.decode(a.subarray(b,c));for(d="";b<c;){var e=a[b++];if(e&128){var h=a[b++]&63;if(192==(e&224))d+=String.fromCharCode((e&31)<<6|h);else{var l=a[b++]&63;e=224==(e&240)?(e&15)<<12|h<<6|l:(e&7)<<18|h<<12|l<<6|a[b++]&63;65536>e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d}var oa,D,F,G,H,I,J,pa,qa; | ||
function na(a,b,c){var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16<c-b&&a.buffer&&ma)return ma.decode(a.subarray(b,c));for(d="";b<c;){var e=a[b++];if(e&128){var g=a[b++]&63;if(192==(e&224))d+=String.fromCharCode((e&31)<<6|g);else{var l=a[b++]&63;e=224==(e&240)?(e&15)<<12|g<<6|l:(e&7)<<18|g<<12|l<<6|a[b++]&63;65536>e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d}var oa,D,F,G,H,I,J,pa,qa; | ||
function ra(){var a=ka.buffer;oa=a;f.HEAP8=D=new Int8Array(a);f.HEAP16=G=new Int16Array(a);f.HEAP32=I=new Int32Array(a);f.HEAPU8=F=new Uint8Array(a);f.HEAPU16=H=new Uint16Array(a);f.HEAPU32=J=new Uint32Array(a);f.HEAPF32=pa=new Float32Array(a);f.HEAPF64=qa=new Float64Array(a)}var sa,ta=[],ua=[],va=[];function wa(){var a=f.preRun.shift();ta.unshift(a)}var K=0,xa=null,L=null; | ||
@@ -25,3 +25,3 @@ function C(a){if(f.onAbort)f.onAbort(a);a="Aborted("+a+")";x(a);la=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");r(a);throw a;}function ya(){return M.startsWith("data:application/octet-stream;base64,")}var M;M="rive_text.wasm";if(!ya()){var za=M;M=f.locateFile?f.locateFile(za,u):u+za}function Aa(){var a=M;try{if(a==M&&y)return new Uint8Array(y);if(w)return w(a);throw"both async and sync fetching of the wasm failed";}catch(b){C(b)}} | ||
function Ha(a){var b=Error,c=Ga(a,function(d){this.name=a;this.message=d;d=Error(d).stack;void 0!==d&&(this.stack=this.toString()+"\n"+d.replace(/^Error(:[^\n]*)?\n/,""))});c.prototype=Object.create(b.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message};return c}var Ia=void 0; | ||
function Ja(a,b,c){function d(g){g=c(g);if(g.length!==a.length)throw new Ia("Mismatched type converter count");for(var k=0;k<a.length;++k)R(a[k],g[k])}a.forEach(function(g){Ea[g]=b});var e=Array(b.length),h=[],l=0;b.forEach((g,k)=>{Q.hasOwnProperty(g)?e[k]=Q[g]:(h.push(g),P.hasOwnProperty(g)||(P[g]=[]),P[g].push(()=>{e[k]=Q[g];++l;l===h.length&&d(e)}))});0===h.length&&d(e)} | ||
function Ja(a,b,c){function d(h){h=c(h);if(h.length!==a.length)throw new Ia("Mismatched type converter count");for(var k=0;k<a.length;++k)R(a[k],h[k])}a.forEach(function(h){Ea[h]=b});var e=Array(b.length),g=[],l=0;b.forEach((h,k)=>{Q.hasOwnProperty(h)?e[k]=Q[h]:(g.push(h),P.hasOwnProperty(h)||(P[h]=[]),P[h].push(()=>{e[k]=Q[h];++l;l===g.length&&d(e)}))});0===g.length&&d(e)} | ||
function Ka(a){switch(a){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+a);}}var La=void 0;function T(a){for(var b="";F[a];)b+=La[F[a++]];return b}var Ma=void 0;function U(a){throw new Ma(a);} | ||
@@ -34,26 +34,26 @@ function R(a,b,c={}){if(!("argPackAdvance"in b))throw new TypeError("registerType registeredInstance requires argPackAdvance");var d=b.name;a||U('type "'+d+'" must have a positive integer typeid pointer');if(Q.hasOwnProperty(a)){if(c.T)return;U("Cannot register type '"+d+"' twice")}Q[a]=b;delete Ea[a];P.hasOwnProperty(a)&&(b=P[a],delete P[a],b.forEach(e=>e()))}var Na=[],V=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Oa(a){4<a&&0===--V[a].N&&(V[a]=void 0,Na.push(a))} | ||
function Ua(a,b){var c=[];return function(){c.length=0;Object.assign(c,arguments);if(a.includes("j")){var d=f["dynCall_"+a];d=c&&c.length?d.apply(null,[b].concat(c)):d.call(null,b)}else d=sa.get(b).apply(null,c);return d}}function Y(a,b){a=T(a);var c=a.includes("j")?Ua(a,b):sa.get(b);"function"!=typeof c&&U("unknown function pointer with signature "+a+": "+b);return c}var Va=void 0;function Wa(a){a=Xa(a);var b=T(a);Z(a);return b} | ||
function Ya(a,b){function c(h){e[h]||Q[h]||(Ea[h]?Ea[h].forEach(c):(d.push(h),e[h]=!0))}var d=[],e={};b.forEach(c);throw new Va(a+": "+d.map(Wa).join([", "]));}function Za(a,b,c){switch(b){case 0:return c?function(d){return D[d]}:function(d){return F[d]};case 1:return c?function(d){return G[d>>1]}:function(d){return H[d>>1]};case 2:return c?function(d){return I[d>>2]}:function(d){return J[d>>2]};default:throw new TypeError("Unknown integer type: "+a);}} | ||
function Ya(a,b){function c(g){e[g]||Q[g]||(Ea[g]?Ea[g].forEach(c):(d.push(g),e[g]=!0))}var d=[],e={};b.forEach(c);throw new Va(a+": "+d.map(Wa).join([", "]));}function Za(a,b,c){switch(b){case 0:return c?function(d){return D[d]}:function(d){return F[d]};case 1:return c?function(d){return G[d>>1]}:function(d){return H[d>>1]};case 2:return c?function(d){return I[d>>2]}:function(d){return J[d>>2]};default:throw new TypeError("Unknown integer type: "+a);}} | ||
var $a="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function ab(a,b){var c=a>>1;for(var d=c+b/2;!(c>=d)&&H[c];)++c;c<<=1;if(32<c-a&&$a)return $a.decode(F.subarray(a,c));c="";for(d=0;!(d>=b/2);++d){var e=G[a+2*d>>1];if(0==e)break;c+=String.fromCharCode(e)}return c}function bb(a,b,c){void 0===c&&(c=2147483647);if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var e=0;e<c;++e)G[b>>1]=a.charCodeAt(e),b+=2;G[b>>1]=0;return b-d}function cb(a){return 2*a.length} | ||
function db(a,b){for(var c=0,d="";!(c>=b/4);){var e=I[a+4*c>>2];if(0==e)break;++c;65536<=e?(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023)):d+=String.fromCharCode(e)}return d}function eb(a,b,c){void 0===c&&(c=2147483647);if(4>c)return 0;var d=b;c=d+c-4;for(var e=0;e<a.length;++e){var h=a.charCodeAt(e);if(55296<=h&&57343>=h){var l=a.charCodeAt(++e);h=65536+((h&1023)<<10)|l&1023}I[b>>2]=h;b+=4;if(b+4>c)break}I[b>>2]=0;return b-d} | ||
function db(a,b){for(var c=0,d="";!(c>=b/4);){var e=I[a+4*c>>2];if(0==e)break;++c;65536<=e?(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023)):d+=String.fromCharCode(e)}return d}function eb(a,b,c){void 0===c&&(c=2147483647);if(4>c)return 0;var d=b;c=d+c-4;for(var e=0;e<a.length;++e){var g=a.charCodeAt(e);if(55296<=g&&57343>=g){var l=a.charCodeAt(++e);g=65536+((g&1023)<<10)|l&1023}I[b>>2]=g;b+=4;if(b+4>c)break}I[b>>2]=0;return b-d} | ||
function fb(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&++c;b+=4}return b}function gb(a,b){var c=Q[a];void 0===c&&U(b+" has unknown type "+Wa(a));return c}var hb={};function ib(a){var b=hb[a];return void 0===b?T(a):b}var jb=[];function kb(a){var b=jb.length;jb.push(a);return b}function lb(a,b){for(var c=Array(a),d=0;d<a;++d)c[d]=gb(J[b+4*d>>2],"parameter "+d);return c}var mb=[],nb={}; | ||
function ob(){if(!pb){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:da||"./this.program"},b;for(b in nb)void 0===nb[b]?delete a[b]:a[b]=nb[b];var c=[];for(b in a)c.push(b+"="+a[b]);pb=c}return pb}var pb,qb=[null,[],[]];Ia=f.InternalError=Ha("InternalError");for(var rb=Array(256),sb=0;256>sb;++sb)rb[sb]=String.fromCharCode(sb);La=rb;Ma=f.BindingError=Ha("BindingError"); | ||
f.count_emval_handles=function(){for(var a=0,b=5;b<V.length;++b)void 0!==V[b]&&++a;return a};f.get_first_emval=function(){for(var a=5;a<V.length;++a)if(void 0!==V[a])return V[a];return null};Va=f.UnboundTypeError=Ha("UnboundTypeError"); | ||
var ub={o:function(a){var b=N[a];delete N[a];var c=b.elements,d=c.length,e=c.map(function(g){return g.S}).concat(c.map(function(g){return g.Y})),h=b.V,l=b.W;Ja([a],e,function(g){c.forEach((k,m)=>{var n=g[m],q=k.P,z=k.R,A=g[m+d],p=k.X,ca=k.Z;k.read=B=>n.fromWireType(q(z,B));k.write=(B,E)=>{var S=[];p(ca,B,A.toWireType(S,E));Da(S)}});return[{name:b.name,fromWireType:function(k){for(var m=Array(d),n=0;n<d;++n)m[n]=c[n].read(k);l(k);return m},toWireType:function(k,m){if(d!==m.length)throw new TypeError("Incorrect number of tuple elements for "+ | ||
b.name+": expected="+d+", actual="+m.length);for(var n=h(),q=0;q<d;++q)c[q].write(n,m[q]);null!==k&&k.push(l,n);return n},argPackAdvance:8,readValueFromPointer:O,M:l}]})},r:function(){},y:function(a,b,c,d,e){var h=Ka(c);b=T(b);R(a,{name:b,fromWireType:function(l){return!!l},toWireType:function(l,g){return g?d:e},argPackAdvance:8,readValueFromPointer:function(l){if(1===c)var g=D;else if(2===c)g=G;else if(4===c)g=I;else throw new TypeError("Unknown boolean type size: "+b);return this.fromWireType(g[l>> | ||
h])},M:null})},x:function(a,b){b=T(b);R(a,{name:b,fromWireType:function(c){var d=W(c);Oa(c);return d},toWireType:function(c,d){return X(d)},argPackAdvance:8,readValueFromPointer:O,M:null})},k:function(a,b,c){c=Ka(c);b=T(b);R(a,{name:b,fromWireType:function(d){return d},toWireType:function(d,e){return e},argPackAdvance:8,readValueFromPointer:Pa(b,c),M:null})},e:function(a,b,c,d,e,h){var l=Ta(b,c);a=T(a);e=Y(d,e);Sa(a,function(){Ya("Cannot call "+a+" due to unbound types",l)},b-1);Ja([],l,function(g){var k= | ||
[g[0],null].concat(g.slice(1)),m=g=a,n=e,q=k.length;2>q&&U("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var z=null!==k[1]&&!1,A=!1,p=1;p<k.length;++p)if(null!==k[p]&&void 0===k[p].M){A=!0;break}var ca="void"!==k[0].name,B="",E="";for(p=0;p<q-2;++p)B+=(0!==p?", ":"")+"arg"+p,E+=(0!==p?", ":"")+"arg"+p+"Wired";m="return function "+Fa(m)+"("+B+") {\nif (arguments.length !== "+(q-2)+") {\nthrowBindingError('function "+m+" called with ' + arguments.length + ' arguments, expected "+ | ||
(q-2)+" args!');\n}\n";A&&(m+="var destructors = [];\n");var S=A?"destructors":"null";B="throwBindingError invoker fn runDestructors retType classParam".split(" ");n=[U,n,h,Da,k[0],k[1]];z&&(m+="var thisWired = classParam.toWireType("+S+", this);\n");for(p=0;p<q-2;++p)m+="var arg"+p+"Wired = argType"+p+".toWireType("+S+", arg"+p+"); // "+k[p+2].name+"\n",B.push("argType"+p),n.push(k[p+2]);z&&(E="thisWired"+(0<E.length?", ":"")+E);m+=(ca?"var rv = ":"")+"invoker(fn"+(0<E.length?", ":"")+E+");\n";if(A)m+= | ||
"runDestructors(destructors);\n";else for(p=z?1:2;p<k.length;++p)q=1===p?"thisWired":"arg"+(p-2)+"Wired",null!==k[p].M&&(m+=q+"_dtor("+q+"); // "+k[p].name+"\n",B.push(q+"_dtor"),n.push(k[p].M));ca&&(m+="var ret = retType.fromWireType(rv);\nreturn ret;\n");B.push(m+"}\n");k=Qa(B).apply(null,n);p=b-1;if(!f.hasOwnProperty(g))throw new Ia("Replacing nonexistant public symbol");void 0!==f[g].L&&void 0!==p?f[g].L[p]=k:(f[g]=k,f[g].O=p);return[]})},d:function(a,b,c,d,e){b=T(b);-1===e&&(e=4294967295);e= | ||
Ka(c);var h=g=>g;if(0===d){var l=32-8*c;h=g=>g<<l>>>l}c=b.includes("unsigned")?function(g,k){return k>>>0}:function(g,k){return k};R(a,{name:b,fromWireType:h,toWireType:c,argPackAdvance:8,readValueFromPointer:Za(b,e,0!==d),M:null})},a:function(a,b,c){function d(h){h>>=2;var l=J;return new e(oa,l[h+1],l[h])}var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b];c=T(c);R(a,{name:c,fromWireType:d,argPackAdvance:8,readValueFromPointer:d},{T:!0})},l:function(a, | ||
b){b=T(b);var c="std::string"===b;R(a,{name:b,fromWireType:function(d){var e=J[d>>2],h=d+4;if(c)for(var l=h,g=0;g<=e;++g){var k=h+g;if(g==e||0==F[k]){l=l?na(F,l,k-l):"";if(void 0===m)var m=l;else m+=String.fromCharCode(0),m+=l;l=k+1}}else{m=Array(e);for(g=0;g<e;++g)m[g]=String.fromCharCode(F[h+g]);m=m.join("")}Z(d);return m},toWireType:function(d,e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var h,l="string"==typeof e;l||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array|| | ||
U("Cannot pass non-string to std::string");var g;if(c&&l)for(h=g=0;h<e.length;++h){var k=e.charCodeAt(h);127>=k?g++:2047>=k?g+=2:55296<=k&&57343>=k?(g+=4,++h):g+=3}else g=e.length;h=g;g=tb(4+h+1);k=g+4;J[g>>2]=h;if(c&&l){if(l=k,k=h+1,h=F,0<k){k=l+k-1;for(var m=0;m<e.length;++m){var n=e.charCodeAt(m);if(55296<=n&&57343>=n){var q=e.charCodeAt(++m);n=65536+((n&1023)<<10)|q&1023}if(127>=n){if(l>=k)break;h[l++]=n}else{if(2047>=n){if(l+1>=k)break;h[l++]=192|n>>6}else{if(65535>=n){if(l+2>=k)break;h[l++]= | ||
224|n>>12}else{if(l+3>=k)break;h[l++]=240|n>>18;h[l++]=128|n>>12&63}h[l++]=128|n>>6&63}h[l++]=128|n&63}}h[l]=0}}else if(l)for(l=0;l<h;++l)m=e.charCodeAt(l),255<m&&(Z(k),U("String has UTF-16 code units that do not fit in 8 bits")),F[k+l]=m;else for(l=0;l<h;++l)F[k+l]=e[l];null!==d&&d.push(Z,g);return g},argPackAdvance:8,readValueFromPointer:O,M:function(d){Z(d)}})},f:function(a,b,c){c=T(c);if(2===b){var d=ab;var e=bb;var h=cb;var l=()=>H;var g=1}else 4===b&&(d=db,e=eb,h=fb,l=()=>J,g=2);R(a,{name:c, | ||
fromWireType:function(k){for(var m=J[k>>2],n=l(),q,z=k+4,A=0;A<=m;++A){var p=k+4+A*b;if(A==m||0==n[p>>g])z=d(z,p-z),void 0===q?q=z:(q+=String.fromCharCode(0),q+=z),z=p+b}Z(k);return q},toWireType:function(k,m){"string"!=typeof m&&U("Cannot pass non-string to C++ string type "+c);var n=h(m),q=tb(4+n+b);J[q>>2]=n>>g;e(m,q+4,n+b);null!==k&&k.push(Z,q);return q},argPackAdvance:8,readValueFromPointer:O,M:function(k){Z(k)}})},p:function(a,b,c,d,e,h){N[a]={name:T(b),V:Y(c,d),W:Y(e,h),elements:[]}},j:function(a, | ||
b,c,d,e,h,l,g,k){N[a].elements.push({S:b,P:Y(c,d),R:e,Y:h,X:Y(l,g),Z:k})},z:function(a,b){b=T(b);R(a,{U:!0,name:b,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},n:function(a,b,c){a=W(a);b=gb(b,"emval::as");var d=[],e=X(d);J[c>>2]=e;return b.toWireType(d,a)},C:function(a,b,c,d){a=jb[a];b=W(b);c=ib(c);a(b,c,null,d)},b:Oa,B:function(a,b){var c=lb(a,b),d=c[0];b=d.name+"_$"+c.slice(1).map(function(n){return n.name}).join("_")+"$";var e=mb[b];if(void 0!==e)return e;e=["retType"]; | ||
for(var h=[d],l="",g=0;g<a-1;++g)l+=(0!==g?", ":"")+"arg"+g,e.push("argType"+g),h.push(c[1+g]);var k="return function "+Fa("methodCaller_"+b)+"(handle, name, destructors, args) {\n",m=0;for(g=0;g<a-1;++g)k+=" var arg"+g+" = argType"+g+".readValueFromPointer(args"+(m?"+"+m:"")+");\n",m+=c[g+1].argPackAdvance;k+=" var rv = handle[name]("+l+");\n";for(g=0;g<a-1;++g)c[g+1].deleteObject&&(k+=" argType"+g+".deleteObject(arg"+g+");\n");d.U||(k+=" return retType.toWireType(destructors, rv);\n"); | ||
e.push(k+"};\n");a=Qa(e).apply(null,h);e=kb(a);return mb[b]=e},i:function(a,b){a=W(a);b=W(b);return X(a[b])},A:function(a){4<a&&(V[a].N+=1)},h:function(a){return X(ib(a))},m:function(a){var b=W(a);Da(b);Oa(a)},g:function(a,b){a=gb(a,"_emval_take_value");a=a.readValueFromPointer(b);return X(a)},c:function(){C("")},s:function(a){var b=F.length;a>>>=0;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);var e=Math;d=Math.max(a,d);e=e.min.call(e,2147483648,d+(65536- | ||
d%65536)%65536);a:{try{ka.grow(e-oa.byteLength+65535>>>16);ra();var h=1;break a}catch(l){}h=void 0}if(h)return!0}return!1},t:function(a,b){var c=0;ob().forEach(function(d,e){var h=b+c;e=J[a+4*e>>2]=h;for(h=0;h<d.length;++h)D[e++>>0]=d.charCodeAt(h);D[e>>0]=0;c+=d.length+1});return 0},u:function(a,b){var c=ob();J[a>>2]=c.length;var d=0;c.forEach(function(e){d+=e.length+1});J[b>>2]=d;return 0},v:function(){return 52},q:function(){return 70},w:function(a,b,c,d){for(var e=0,h=0;h<c;h++){var l=J[b>>2], | ||
g=J[b+4>>2];b+=8;for(var k=0;k<g;k++){var m=F[l+k],n=qb[a];0===m||10===m?((1===a?ja:x)(na(n,0)),n.length=0):n.push(m)}e+=g}J[d>>2]=e;return 0}}; | ||
(function(){function a(e){f.asm=e.exports;ka=f.asm.D;ra();sa=f.asm.J;ua.unshift(f.asm.E);K--;f.monitorRunDependencies&&f.monitorRunDependencies(K);0==K&&(null!==xa&&(clearInterval(xa),xa=null),L&&(e=L,L=null,e()))}function b(e){a(e.instance)}function c(e){return Ba().then(function(h){return WebAssembly.instantiate(h,d)}).then(function(h){return h}).then(e,function(h){x("failed to asynchronously prepare wasm: "+h);C(h)})}var d={a:ub};K++;f.monitorRunDependencies&&f.monitorRunDependencies(K);if(f.instantiateWasm)try{return f.instantiateWasm(d, | ||
a)}catch(e){x("Module.instantiateWasm callback failed with error: "+e),r(e)}(function(){return y||"function"!=typeof WebAssembly.instantiateStreaming||ya()||M.startsWith("file://")||fa||"function"!=typeof fetch?c(b):fetch(M,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,d).then(b,function(h){x("wasm streaming compile failed: "+h);x("falling back to ArrayBuffer instantiation");return c(b)})})})().catch(r);return{}})(); | ||
var ub={k:function(a){var b=N[a];delete N[a];var c=b.elements,d=c.length,e=c.map(function(h){return h.S}).concat(c.map(function(h){return h.Y})),g=b.V,l=b.W;Ja([a],e,function(h){c.forEach((k,m)=>{var n=h[m],q=k.P,z=k.R,A=h[m+d],p=k.X,ca=k.Z;k.read=B=>n.fromWireType(q(z,B));k.write=(B,E)=>{var S=[];p(ca,B,A.toWireType(S,E));Da(S)}});return[{name:b.name,fromWireType:function(k){for(var m=Array(d),n=0;n<d;++n)m[n]=c[n].read(k);l(k);return m},toWireType:function(k,m){if(d!==m.length)throw new TypeError("Incorrect number of tuple elements for "+ | ||
b.name+": expected="+d+", actual="+m.length);for(var n=g(),q=0;q<d;++q)c[q].write(n,m[q]);null!==k&&k.push(l,n);return n},argPackAdvance:8,readValueFromPointer:O,M:l}]})},r:function(){},y:function(a,b,c,d,e){var g=Ka(c);b=T(b);R(a,{name:b,fromWireType:function(l){return!!l},toWireType:function(l,h){return h?d:e},argPackAdvance:8,readValueFromPointer:function(l){if(1===c)var h=D;else if(2===c)h=G;else if(4===c)h=I;else throw new TypeError("Unknown boolean type size: "+b);return this.fromWireType(h[l>> | ||
g])},M:null})},x:function(a,b){b=T(b);R(a,{name:b,fromWireType:function(c){var d=W(c);Oa(c);return d},toWireType:function(c,d){return X(d)},argPackAdvance:8,readValueFromPointer:O,M:null})},m:function(a,b,c){c=Ka(c);b=T(b);R(a,{name:b,fromWireType:function(d){return d},toWireType:function(d,e){return e},argPackAdvance:8,readValueFromPointer:Pa(b,c),M:null})},d:function(a,b,c,d,e,g){var l=Ta(b,c);a=T(a);e=Y(d,e);Sa(a,function(){Ya("Cannot call "+a+" due to unbound types",l)},b-1);Ja([],l,function(h){var k= | ||
[h[0],null].concat(h.slice(1)),m=h=a,n=e,q=k.length;2>q&&U("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var z=null!==k[1]&&!1,A=!1,p=1;p<k.length;++p)if(null!==k[p]&&void 0===k[p].M){A=!0;break}var ca="void"!==k[0].name,B="",E="";for(p=0;p<q-2;++p)B+=(0!==p?", ":"")+"arg"+p,E+=(0!==p?", ":"")+"arg"+p+"Wired";m="return function "+Fa(m)+"("+B+") {\nif (arguments.length !== "+(q-2)+") {\nthrowBindingError('function "+m+" called with ' + arguments.length + ' arguments, expected "+ | ||
(q-2)+" args!');\n}\n";A&&(m+="var destructors = [];\n");var S=A?"destructors":"null";B="throwBindingError invoker fn runDestructors retType classParam".split(" ");n=[U,n,g,Da,k[0],k[1]];z&&(m+="var thisWired = classParam.toWireType("+S+", this);\n");for(p=0;p<q-2;++p)m+="var arg"+p+"Wired = argType"+p+".toWireType("+S+", arg"+p+"); // "+k[p+2].name+"\n",B.push("argType"+p),n.push(k[p+2]);z&&(E="thisWired"+(0<E.length?", ":"")+E);m+=(ca?"var rv = ":"")+"invoker(fn"+(0<E.length?", ":"")+E+");\n";if(A)m+= | ||
"runDestructors(destructors);\n";else for(p=z?1:2;p<k.length;++p)q=1===p?"thisWired":"arg"+(p-2)+"Wired",null!==k[p].M&&(m+=q+"_dtor("+q+"); // "+k[p].name+"\n",B.push(q+"_dtor"),n.push(k[p].M));ca&&(m+="var ret = retType.fromWireType(rv);\nreturn ret;\n");B.push(m+"}\n");k=Qa(B).apply(null,n);p=b-1;if(!f.hasOwnProperty(h))throw new Ia("Replacing nonexistant public symbol");void 0!==f[h].L&&void 0!==p?f[h].L[p]=k:(f[h]=k,f[h].O=p);return[]})},e:function(a,b,c,d,e){b=T(b);-1===e&&(e=4294967295);e= | ||
Ka(c);var g=h=>h;if(0===d){var l=32-8*c;g=h=>h<<l>>>l}c=b.includes("unsigned")?function(h,k){return k>>>0}:function(h,k){return k};R(a,{name:b,fromWireType:g,toWireType:c,argPackAdvance:8,readValueFromPointer:Za(b,e,0!==d),M:null})},a:function(a,b,c){function d(g){g>>=2;var l=J;return new e(oa,l[g+1],l[g])}var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b];c=T(c);R(a,{name:c,fromWireType:d,argPackAdvance:8,readValueFromPointer:d},{T:!0})},n:function(a, | ||
b){b=T(b);var c="std::string"===b;R(a,{name:b,fromWireType:function(d){var e=J[d>>2],g=d+4;if(c)for(var l=g,h=0;h<=e;++h){var k=g+h;if(h==e||0==F[k]){l=l?na(F,l,k-l):"";if(void 0===m)var m=l;else m+=String.fromCharCode(0),m+=l;l=k+1}}else{m=Array(e);for(h=0;h<e;++h)m[h]=String.fromCharCode(F[g+h]);m=m.join("")}Z(d);return m},toWireType:function(d,e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var g,l="string"==typeof e;l||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array|| | ||
U("Cannot pass non-string to std::string");if(c&&l){var h=0;for(g=0;g<e.length;++g){var k=e.charCodeAt(g);127>=k?h++:2047>=k?h+=2:55296<=k&&57343>=k?(h+=4,++g):h+=3}g=h}else g=e.length;h=tb(4+g+1);k=h+4;J[h>>2]=g;if(c&&l){if(l=k,k=g+1,g=F,0<k){k=l+k-1;for(var m=0;m<e.length;++m){var n=e.charCodeAt(m);if(55296<=n&&57343>=n){var q=e.charCodeAt(++m);n=65536+((n&1023)<<10)|q&1023}if(127>=n){if(l>=k)break;g[l++]=n}else{if(2047>=n){if(l+1>=k)break;g[l++]=192|n>>6}else{if(65535>=n){if(l+2>=k)break;g[l++]= | ||
224|n>>12}else{if(l+3>=k)break;g[l++]=240|n>>18;g[l++]=128|n>>12&63}g[l++]=128|n>>6&63}g[l++]=128|n&63}}g[l]=0}}else if(l)for(l=0;l<g;++l)m=e.charCodeAt(l),255<m&&(Z(k),U("String has UTF-16 code units that do not fit in 8 bits")),F[k+l]=m;else for(l=0;l<g;++l)F[k+l]=e[l];null!==d&&d.push(Z,h);return h},argPackAdvance:8,readValueFromPointer:O,M:function(d){Z(d)}})},g:function(a,b,c){c=T(c);if(2===b){var d=ab;var e=bb;var g=cb;var l=()=>H;var h=1}else 4===b&&(d=db,e=eb,g=fb,l=()=>J,h=2);R(a,{name:c, | ||
fromWireType:function(k){for(var m=J[k>>2],n=l(),q,z=k+4,A=0;A<=m;++A){var p=k+4+A*b;if(A==m||0==n[p>>h])z=d(z,p-z),void 0===q?q=z:(q+=String.fromCharCode(0),q+=z),z=p+b}Z(k);return q},toWireType:function(k,m){"string"!=typeof m&&U("Cannot pass non-string to C++ string type "+c);var n=g(m),q=tb(4+n+b);J[q>>2]=n>>h;e(m,q+4,n+b);null!==k&&k.push(Z,q);return q},argPackAdvance:8,readValueFromPointer:O,M:function(k){Z(k)}})},l:function(a,b,c,d,e,g){N[a]={name:T(b),V:Y(c,d),W:Y(e,g),elements:[]}},f:function(a, | ||
b,c,d,e,g,l,h,k){N[a].elements.push({S:b,P:Y(c,d),R:e,Y:g,X:Y(l,h),Z:k})},z:function(a,b){b=T(b);R(a,{U:!0,name:b,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},p:function(a,b,c){a=W(a);b=gb(b,"emval::as");var d=[],e=X(d);J[c>>2]=e;return b.toWireType(d,a)},C:function(a,b,c,d){a=jb[a];b=W(b);c=ib(c);a(b,c,null,d)},b:Oa,B:function(a,b){var c=lb(a,b),d=c[0];b=d.name+"_$"+c.slice(1).map(function(n){return n.name}).join("_")+"$";var e=mb[b];if(void 0!==e)return e;e=["retType"]; | ||
for(var g=[d],l="",h=0;h<a-1;++h)l+=(0!==h?", ":"")+"arg"+h,e.push("argType"+h),g.push(c[1+h]);var k="return function "+Fa("methodCaller_"+b)+"(handle, name, destructors, args) {\n",m=0;for(h=0;h<a-1;++h)k+=" var arg"+h+" = argType"+h+".readValueFromPointer(args"+(m?"+"+m:"")+");\n",m+=c[h+1].argPackAdvance;k+=" var rv = handle[name]("+l+");\n";for(h=0;h<a-1;++h)c[h+1].deleteObject&&(k+=" argType"+h+".deleteObject(arg"+h+");\n");d.U||(k+=" return retType.toWireType(destructors, rv);\n"); | ||
e.push(k+"};\n");a=Qa(e).apply(null,g);e=kb(a);return mb[b]=e},j:function(a,b){a=W(a);b=W(b);return X(a[b])},A:function(a){4<a&&(V[a].N+=1)},i:function(a){return X(ib(a))},o:function(a){var b=W(a);Da(b);Oa(a)},h:function(a,b){a=gb(a,"_emval_take_value");a=a.readValueFromPointer(b);return X(a)},c:function(){C("")},s:function(a){var b=F.length;a>>>=0;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);var e=Math;d=Math.max(a,d);e=e.min.call(e,2147483648,d+(65536- | ||
d%65536)%65536);a:{try{ka.grow(e-oa.byteLength+65535>>>16);ra();var g=1;break a}catch(l){}g=void 0}if(g)return!0}return!1},t:function(a,b){var c=0;ob().forEach(function(d,e){var g=b+c;e=J[a+4*e>>2]=g;for(g=0;g<d.length;++g)D[e++>>0]=d.charCodeAt(g);D[e>>0]=0;c+=d.length+1});return 0},u:function(a,b){var c=ob();J[a>>2]=c.length;var d=0;c.forEach(function(e){d+=e.length+1});J[b>>2]=d;return 0},v:function(){return 52},q:function(){return 70},w:function(a,b,c,d){for(var e=0,g=0;g<c;g++){var l=J[b>>2], | ||
h=J[b+4>>2];b+=8;for(var k=0;k<h;k++){var m=F[l+k],n=qb[a];0===m||10===m?((1===a?ja:x)(na(n,0)),n.length=0):n.push(m)}e+=h}J[d>>2]=e;return 0}}; | ||
(function(){function a(e){f.asm=e.exports;ka=f.asm.D;ra();sa=f.asm.J;ua.unshift(f.asm.E);K--;f.monitorRunDependencies&&f.monitorRunDependencies(K);0==K&&(null!==xa&&(clearInterval(xa),xa=null),L&&(e=L,L=null,e()))}function b(e){a(e.instance)}function c(e){return Ba().then(function(g){return WebAssembly.instantiate(g,d)}).then(function(g){return g}).then(e,function(g){x("failed to asynchronously prepare wasm: "+g);C(g)})}var d={a:ub};K++;f.monitorRunDependencies&&f.monitorRunDependencies(K);if(f.instantiateWasm)try{return f.instantiateWasm(d, | ||
a)}catch(e){x("Module.instantiateWasm callback failed with error: "+e),r(e)}(function(){return y||"function"!=typeof WebAssembly.instantiateStreaming||ya()||M.startsWith("file://")||fa||"function"!=typeof fetch?c(b):fetch(M,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,d).then(b,function(g){x("wasm streaming compile failed: "+g);x("falling back to ArrayBuffer instantiation");return c(b)})})})().catch(r);return{}})(); | ||
f.___wasm_call_ctors=function(){return(f.___wasm_call_ctors=f.asm.E).apply(null,arguments)};var tb=f._malloc=function(){return(tb=f._malloc=f.asm.F).apply(null,arguments)},Z=f._free=function(){return(Z=f._free=f.asm.G).apply(null,arguments)},Xa=f.___getTypeName=function(){return(Xa=f.___getTypeName=f.asm.H).apply(null,arguments)};f.__embind_initialize_bindings=function(){return(f.__embind_initialize_bindings=f.asm.I).apply(null,arguments)}; | ||
@@ -60,0 +60,0 @@ f.dynCall_jiji=function(){return(f.dynCall_jiji=f.asm.K).apply(null,arguments)};var vb;L=function wb(){vb||xb();vb||(L=wb)}; |
{ | ||
"name": "@rive-app/flutter-wasm", | ||
"version": "6.0.0", | ||
"version": "7.0.0", | ||
"description": "WASM portion of Rive's Flutter runtime.", | ||
@@ -15,6 +15,8 @@ "homepage": "https://rive.app", | ||
"test": "jest --testPathPattern=$PWD/test/", | ||
"bump-version": "VERSION=`npm version major` && echo \"const wasmVersion = '$VERSION';\" > ../lib/src/rive_text_wasm_version.dart" | ||
"bump-version": "VERSION=`npm version major` && echo \"const wasmVersion = '$VERSION';\" > ../lib/src/rive_text_wasm_version.dart", | ||
"serve": "http-server build/bin/ -p 8282 --cors" | ||
}, | ||
"devDependencies": { | ||
"jest": "^29.0.3" | ||
"jest": "^29.0.3", | ||
"http-server": "^14.1.1" | ||
}, | ||
@@ -21,0 +23,0 @@ "keywords": [], |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
470418
4
1
31
2