function v(s,t){s.push(t&255)}function o(s,t){s.push(t&255,t>>8&255)}function e(s,t){s.push(t&255,t>>8&255,t>>16&255,t>>>24&255)}function X(s){const t=[];o(t,s.length);for(let _=0;_<s.length;_++)o(t,s.charCodeAt(_));return o(t,0),t}function U(s){const t=s.map(X),_=s.length,a=0,n=0,T=_*4,S=28,u=S+T,r=[],A=[];for(const d of t)A.push(r.length),r.push(...d);const h=u+r.length,c=[];o(c,1),o(c,S),e(c,h),e(c,_),e(c,a),e(c,n),e(c,u),e(c,0);for(const d of A)e(c,d);return c.push(...r),c}function k(s){const t=[],a=8+s.length*4;o(t,384),o(t,8),e(t,a);for(const n of s)e(t,n);return t}function y(s,t,_,a){const n=[];return o(n,s),o(n,16),e(n,24),e(n,t),e(n,4294967295),e(n,_),e(n,a),n}function I(s,t,_,a){const n=[],S=36+a.length*20;o(n,258),o(n,36),e(n,S),e(n,s),e(n,4294967295),e(n,t),e(n,_),o(n,20),o(n,20),o(n,a.length),o(n,0),o(n,0),o(n,0);for(const u of a)e(n,u.nsIdx),e(n,u.nameIdx),e(n,u.rawValueIdx),o(n,8),v(n,0),v(n,u.valueType),e(n,u.valueData);return n}function i(s,t,_){const a=[];return o(a,259),o(a,16),e(a,24),e(a,s),e(a,4294967295),e(a,t),e(a,_),a}function B(s,t,_=1,a="1.0"){const n=["http://schemas.android.com/apk/res/android","android","","manifest","package","versionCode","versionName","application","label",s,a,t,"activity","name",".MainActivity","intent-filter","action","android.intent.action.MAIN","category","android.intent.category.LAUNCHER","uses-permission","android.permission.INTERNET"],T=0,S=1,u=3,r=4,A=5,h=6,c=7,d=8,p=9,P=10,N=11,M=12,l=13,L=14,f=15,x=16,Y=17,C=18,D=19,O=20,V=21,G=[0,0,0,0,0,16843291,16843292,0,16842753,0,0,0,0,16842755],b=U(n),w=k(G),E=[];E.push(...y(256,1,S,T)),E.push(...I(2,-1,O,[{nsIdx:T,nameIdx:l,rawValueIdx:V,valueType:3,valueData:V}])),E.push(...i(2,-1,O)),E.push(...I(3,-1,u,[{nsIdx:-1,nameIdx:r,rawValueIdx:p,valueType:3,valueData:p},{nsIdx:T,nameIdx:A,rawValueIdx:-1,valueType:16,valueData:_},{nsIdx:T,nameIdx:h,rawValueIdx:P,valueType:3,valueData:P}])),E.push(...I(4,-1,c,[{nsIdx:T,nameIdx:d,rawValueIdx:N,valueType:3,valueData:N}])),E.push(...I(5,-1,M,[{nsIdx:T,nameIdx:l,rawValueIdx:L,valueType:3,valueData:L},{nsIdx:T,nameIdx:d,rawValueIdx:N,valueType:3,valueData:N}])),E.push(...I(6,-1,f,[])),E.push(...I(7,-1,x,[{nsIdx:T,nameIdx:l,rawValueIdx:Y,valueType:3,valueData:Y}])),E.push(...i(7,-1,x)),E.push(...I(8,-1,C,[{nsIdx:T,nameIdx:l,rawValueIdx:D,valueType:3,valueData:D}])),E.push(...i(8,-1,C)),E.push(...i(9,-1,f)),E.push(...i(10,-1,M)),E.push(...i(11,-1,c)),E.push(...i(12,-1,u)),E.push(...y(257,13,S,T));const m=[...b,...w,...E],g=8,z=g+m.length,R=[];return o(R,3),o(R,g),e(R,z),R.push(...m),new Uint8Array(R)}export{B as buildBinaryAndroidManifest};
