mirror of
https://codeberg.org/kirche-im-netz/Startodon-Hub.git
synced 2025-06-21 00:26:08 +02:00
2 lines
26 KiB
JavaScript
2 lines
26 KiB
JavaScript
|
/*! kjua v0.10.0 - undefined */
|
||
|
((t,r)=>{"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("kjua",[],r):"object"==typeof exports?exports.kjua=r():t.kjua=r()})("undefined"!=typeof self?self:this,()=>{return n=[(t,r,e)=>{function n(t){var t=Object.assign({},o,t),r=i(t.text,t.ecLevel,t.minVersion,t.quiet);return"svg"===t.render?u(r,t):a(r,t,"image"===t.render)}var o=e(1),i=e(2),a=e(4),u=e(8);t.exports=n;try{jQuery.fn.kjua=function(e){return this.each(function(t,r){return r.appendChild(n(e))})}}catch(t){}},t=>{t.exports={render:"image",crisp:!0,minVersion:1,ecLevel:"L",size:200,ratio:null,fill:"#333",back:"#fff",text:"no text",rounded:0,quiet:0,mode:"plain",mSize:30,mPosX:50,mPosY:50,label:"no label",fontname:"sans",fontcolor:"#333",image:null}},(t,r,e)=>{function i(t,r){for(var e,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,o=Math.max(1,n);o<=40;o+=1)if(e=(()=>{try{var e=u(o,r),n=(e.addData(t),e.make(),e.getModuleCount());return{v:{text:t,level:r,version:o,module_count:n,is_dark:function(t,r){return 0<=t&&t<n&&0<=r&&r<n&&e.isDark(t,r)}}}}catch(t){if(!(o<40&&a.test(t)))throw new Error(t)}})())return e.v;return null}var a=/code length overflow/i,u=e(3);u.stringToBytes=u.stringToBytesFuncs["UTF-8"];t.exports=function(){var e,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"L",n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,t=i(t,r,n);return t&&(e=t.is_dark,t.module_count+=2*o,t.is_dark=function(t,r){return e(t-o,r-o)}),t}},(t,r)=>{z.stringToBytes=(z.stringToBytesFuncs={default:function(t){for(var r=[],e=0;e<t.length;e+=1){var n=t.charCodeAt(e);r.push(255&n)}return r}}).default,z.createStringToBytes=function(f,l){var o=(()=>{for(var r=y(f),t=function(){var t=r.read();if(-1==t)throw"eof";return t},e=0,n={};;){var o=r.read();if(-1==o)break;var i=t(),a=t(),u=t();n[String.fromCharCode(o<<8|i)]=a<<8|u,e+=1}if(e!=l)throw e+" != "+l;return n})(),i="?".charCodeAt(0);return function(t){for(var r=[],e=0;e<t.length;e+=1){var n=t.charCodeAt(e);n<128?r.push(n):"number"==typeof(n=o[t.charAt(e)])?(255&n)==n?r.push(n):(r.push(n>>>8),r.push(255&n)):r.push(i)}return r}},u=8,k={L:a=1,M:0,Q:3,H:i=2},o=0,f=1,l=2,c=3,s=n=4,g=5,d=7,e=[[],[h=6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],(w={}).getBCHTypeInfo=function(t){for(var r=t<<10;0<=T(r)-T(1335);)r^=1335<<T(r)-T(1335);return 21522^(t<<10|r)},w.getBCHTypeNumber=function(t){for(var r=t<<12;0<=T(r)-T(7973);)r^=7973<<T(r)-T(7973);return t<<12|r},w.getPatternPosition=function(t){return e[t-1]},w.getMaskFunction=function(t){switch(t){case o:return function(t,r){return(t+r)%2==0};case f:return function(t,r){return t%2==0};case l:return function(t,r){return r%3==0};case c:return function(t,r){return(t+r)%3==0};case s:return function(t,r){return(Math.floor(t/2)+Math.floor(r/3))%2==0};case g:return function(t,r){return t*r%2+t*r%3==0};case h:return function(t,r){return(t*r%2+t*r%3)%2==0};case d:return function(t,r){return(t*r%3+(t+r)%2)%2==0};default:throw"bad maskPattern:"+t}},w.getErrorCorrectPolynomial=function(t){for(var r=_([1],0),e=0;e<t;e+=1)r=r.multiply(_([1,v.gexp(e)],0));return r},w.getLengthInBits=function(t,r){if(1<=r&&r<10)switch(t){case a:return 10;case i:return 9;case n:case u:return 8;default:throw"mode:"+t}else if(r<27)switch(t){case a:return 12;case i:return 11;case n:return 16;case u:return 10;default:throw"mode:"+t}else{if(!(r<41))throw"type:"+r;switc
|