CarteirinhaPage-yPU84HIF.js 29 KB

12345678
  1. import{ah as ge,k as $,ai as me,w as we,S as _e,a7 as z,a4 as j,a2 as P,a1 as Pt,ac as St,b as pe,ak as ye,R as Mt,a0 as L,a3 as Ce,aa as tt,al as Ee,$ as et,N as Be,a8 as ve,a6 as b,at as bt}from"./index-Cd2JsgaO.js";import{g as Re}from"./_commonjsHelpers-CqkleIqs.js";import{_ as Ae}from"./DefaultHeaderPage-v-AWrrr2.js";import{L as Ie}from"./logo_serprati_parceiro-BC652OUz.js";import{_ as Te}from"./_plugin-vue_export-helper-DlAUqK2U.js";var J={},nt,Lt;function Ne(){return Lt||(Lt=1,nt=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),nt}var rt={},F={},qt;function V(){if(qt)return F;qt=1;let r;const o=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return F.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17},F.getSymbolTotalCodewords=function(e){return o[e]},F.getBCHDigit=function(i){let e=0;for(;i!==0;)e++,i>>>=1;return e},F.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');r=e},F.isKanjiModeEnabled=function(){return typeof r<"u"},F.toSJIS=function(e){return r(e)},F}var ot={},Dt;function At(){return Dt||(Dt=1,(function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function o(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+i)}}r.isValid=function(e){return e&&typeof e.bit<"u"&&e.bit>=0&&e.bit<4},r.from=function(e,t){if(r.isValid(e))return e;try{return o(e)}catch{return t}}})(ot)),ot}var it,kt;function Pe(){if(kt)return it;kt=1;function r(){this.buffer=[],this.length=0}return r.prototype={get:function(o){const i=Math.floor(o/8);return(this.buffer[i]>>>7-o%8&1)===1},put:function(o,i){for(let e=0;e<i;e++)this.putBit((o>>>i-e-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(o){const i=Math.floor(this.length/8);this.buffer.length<=i&&this.buffer.push(0),o&&(this.buffer[i]|=128>>>this.length%8),this.length++}},it=r,it}var st,Ut;function Se(){if(Ut)return st;Ut=1;function r(o){if(!o||o<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=o,this.data=new Uint8Array(o*o),this.reservedBit=new Uint8Array(o*o)}return r.prototype.set=function(o,i,e,t){const n=o*this.size+i;this.data[n]=e,t&&(this.reservedBit[n]=!0)},r.prototype.get=function(o,i){return this.data[o*this.size+i]},r.prototype.xor=function(o,i,e){this.data[o*this.size+i]^=e},r.prototype.isReserved=function(o,i){return this.reservedBit[o*this.size+i]},st=r,st}var at={},Ft;function Me(){return Ft||(Ft=1,(function(r){const o=V().getSymbolSize;r.getRowColCoords=function(e){if(e===1)return[];const t=Math.floor(e/7)+2,n=o(e),s=n===145?26:Math.ceil((n-13)/(2*t-2))*2,a=[n-7];for(let u=1;u<t-1;u++)a[u]=a[u-1]-s;return a.push(6),a.reverse()},r.getPositions=function(e){const t=[],n=r.getRowColCoords(e),s=n.length;for(let a=0;a<s;a++)for(let u=0;u<s;u++)a===0&&u===0||a===0&&u===s-1||a===s-1&&u===0||t.push([n[a],n[u]]);return t}})(at)),at}var ut={},zt;function be(){if(zt)return ut;zt=1;const r=V().getSymbolSize,o=7;return ut.getPositions=function(e){const t=r(e);return[[0,0],[t-o,0],[0,t-o]]},ut}var ct={},Vt;function Le(){return Vt||(Vt=1,(function(r){r.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const o={N1:3,N2:3,N3:40,N4:10};r.isValid=function(t){return t!=null&&t!==""&&!isNaN(t)&&t>=0&&t<=7},r.from=function(t){return r.isValid(t)?parseInt(t,10):void 0},r.getPenaltyN1=function(t){const n=t.size;let s=0,a=0,u=0,c=null,d=null;for(let C=0;C<n;C++){a=u=0,c=d=null;for(let g=0;g<n;g++){let l=t.get(C,g);l===c?a++:(a>=5&&(s+=o.N1+(a-5)),c=l,a=1),l=t.get(g,C),l===d?u++:(u>=5&&(s+=o.N1+(u-5)),d=l,u=1)}a>=5&&(s+=o.N1+(a-5)),u>=5&&(s+=o.N1+(u-5))}return s},r.getPenaltyN2=function(t){const n=t.size;let s=0;for(let a=0;a<n-1;a++)for(let u=0;u<n-1;u++){const c=t.get(a,u)+t.get(a,u+1)+t.get(a+1,u)+t.get(a+1,u+1);(c===4||c===0)&&s++}return s*o.N2},r.getPenaltyN3=function(t){const n=t.size;let s=0,a=0,u=0;for(let c=0;c<n;c++){a=u=0;for(let d=0;d<n;d++)a=a<<1&2047|t.get(c,d),d>=10&&(a===1488||a===93)&&s++,u=u<<1&2047|t.get(d,c),d>=10&&(u===1488||u===93)&&s++}return s*o.N3},r.getPenaltyN4=function(t){let n=0;const s=t.data.length;for(let u=0;u<s;u++)n+=t.data[u];return Math.abs(Math.ceil(n*100/s/5)-10)*o.N4};function i(e,t,n){switch(e){case r.Patterns.PATTERN000:return(t+n)%2===0;case r.Patterns.PATTERN001:return t%2===0;case r.Patterns.PATTERN010:return n%3===0;case r.Patterns.PATTERN011:return(t+n)%3===0;case r.Patterns.PATTERN100:return(Math.floor(t/2)+Math.floor(n/3))%2===0;case r.Patterns.PATTERN101:return t*n%2+t*n%3===0;case r.Patterns.PATTERN110:return(t*n%2+t*n%3)%2===0;case r.Patterns.PATTERN111:return(t*n%3+(t+n)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}r.applyMask=function(t,n){const s=n.size;for(let a=0;a<s;a++)for(let u=0;u<s;u++)n.isReserved(u,a)||n.xor(u,a,i(t,u,a))},r.getBestMask=function(t,n){const s=Object.keys(r.Patterns).length;let a=0,u=1/0;for(let c=0;c<s;c++){n(c),r.applyMask(c,t);const d=r.getPenaltyN1(t)+r.getPenaltyN2(t)+r.getPenaltyN3(t)+r.getPenaltyN4(t);r.applyMask(c,t),d<u&&(u=d,a=c)}return a}})(ct)),ct}var G={},Ht;function ae(){if(Ht)return G;Ht=1;const r=At(),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return G.getBlocksCount=function(t,n){switch(n){case r.L:return o[(t-1)*4+0];case r.M:return o[(t-1)*4+1];case r.Q:return o[(t-1)*4+2];case r.H:return o[(t-1)*4+3];default:return}},G.getTotalCodewordsCount=function(t,n){switch(n){case r.L:return i[(t-1)*4+0];case r.M:return i[(t-1)*4+1];case r.Q:return i[(t-1)*4+2];case r.H:return i[(t-1)*4+3];default:return}},G}var lt={},Q={},Kt;function qe(){if(Kt)return Q;Kt=1;const r=new Uint8Array(512),o=new Uint8Array(256);return(function(){let e=1;for(let t=0;t<255;t++)r[t]=e,o[e]=t,e<<=1,e&256&&(e^=285);for(let t=255;t<512;t++)r[t]=r[t-255]})(),Q.log=function(e){if(e<1)throw new Error("log("+e+")");return o[e]},Q.exp=function(e){return r[e]},Q.mul=function(e,t){return e===0||t===0?0:r[o[e]+o[t]]},Q}var Jt;function De(){return Jt||(Jt=1,(function(r){const o=qe();r.mul=function(e,t){const n=new Uint8Array(e.length+t.length-1);for(let s=0;s<e.length;s++)for(let a=0;a<t.length;a++)n[s+a]^=o.mul(e[s],t[a]);return n},r.mod=function(e,t){let n=new Uint8Array(e);for(;n.length-t.length>=0;){const s=n[0];for(let u=0;u<t.length;u++)n[u]^=o.mul(t[u],s);let a=0;for(;a<n.length&&n[a]===0;)a++;n=n.slice(a)}return n},r.generateECPolynomial=function(e){let t=new Uint8Array([1]);for(let n=0;n<e;n++)t=r.mul(t,new Uint8Array([1,o.exp(n)]));return t}})(lt)),lt}var ft,Ot;function ke(){if(Ot)return ft;Ot=1;const r=De();function o(i){this.genPoly=void 0,this.degree=i,this.degree&&this.initialize(this.degree)}return o.prototype.initialize=function(e){this.degree=e,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const n=r.mod(t,this.genPoly),s=this.degree-n.length;if(s>0){const a=new Uint8Array(this.degree);return a.set(n,s),a}return n},ft=o,ft}var dt={},ht={},gt={},Qt;function ue(){return Qt||(Qt=1,gt.isValid=function(o){return!isNaN(o)&&o>=1&&o<=40}),gt}var q={},Yt;function ce(){if(Yt)return q;Yt=1;const r="[0-9]+",o="[A-Z $%*+\\-./:]+";let i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";i=i.replace(/u/g,"\\u");const e="(?:(?![A-Z0-9 $%*+\\-./:]|"+i+`)(?:.|[\r
  2. ]))+`;q.KANJI=new RegExp(i,"g"),q.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),q.BYTE=new RegExp(e,"g"),q.NUMERIC=new RegExp(r,"g"),q.ALPHANUMERIC=new RegExp(o,"g");const t=new RegExp("^"+i+"$"),n=new RegExp("^"+r+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return q.testKanji=function(u){return t.test(u)},q.testNumeric=function(u){return n.test(u)},q.testAlphanumeric=function(u){return s.test(u)},q}var jt;function H(){return jt||(jt=1,(function(r){const o=ue(),i=ce();r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(n,s){if(!n.ccBits)throw new Error("Invalid mode: "+n);if(!o.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?n.ccBits[0]:s<27?n.ccBits[1]:n.ccBits[2]},r.getBestModeForData=function(n){return i.testNumeric(n)?r.NUMERIC:i.testAlphanumeric(n)?r.ALPHANUMERIC:i.testKanji(n)?r.KANJI:r.BYTE},r.toString=function(n){if(n&&n.id)return n.id;throw new Error("Invalid mode")},r.isValid=function(n){return n&&n.bit&&n.ccBits};function e(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+t)}}r.from=function(n,s){if(r.isValid(n))return n;try{return e(n)}catch{return s}}})(ht)),ht}var Gt;function Ue(){return Gt||(Gt=1,(function(r){const o=V(),i=ae(),e=At(),t=H(),n=ue(),s=7973,a=o.getBCHDigit(s);function u(g,l,I){for(let T=1;T<=40;T++)if(l<=r.getCapacity(T,I,g))return T}function c(g,l){return t.getCharCountIndicator(g,l)+4}function d(g,l){let I=0;return g.forEach(function(T){const S=c(T.mode,l);I+=S+T.getBitsLength()}),I}function C(g,l){for(let I=1;I<=40;I++)if(d(g,I)<=r.getCapacity(I,l,t.MIXED))return I}r.from=function(l,I){return n.isValid(l)?parseInt(l,10):I},r.getCapacity=function(l,I,T){if(!n.isValid(l))throw new Error("Invalid QR Code version");typeof T>"u"&&(T=t.BYTE);const S=o.getSymbolTotalCodewords(l),v=i.getTotalCodewordsCount(l,I),N=(S-v)*8;if(T===t.MIXED)return N;const R=N-c(T,l);switch(T){case t.NUMERIC:return Math.floor(R/10*3);case t.ALPHANUMERIC:return Math.floor(R/11*2);case t.KANJI:return Math.floor(R/13);case t.BYTE:default:return Math.floor(R/8)}},r.getBestVersionForData=function(l,I){let T;const S=e.from(I,e.M);if(Array.isArray(l)){if(l.length>1)return C(l,S);if(l.length===0)return 1;T=l[0]}else T=l;return u(T.mode,T.getLength(),S)},r.getEncodedBits=function(l){if(!n.isValid(l)||l<7)throw new Error("Invalid QR Code version");let I=l<<12;for(;o.getBCHDigit(I)-a>=0;)I^=s<<o.getBCHDigit(I)-a;return l<<12|I}})(dt)),dt}var mt={},Zt;function Fe(){if(Zt)return mt;Zt=1;const r=V(),o=1335,i=21522,e=r.getBCHDigit(o);return mt.getEncodedBits=function(n,s){const a=n.bit<<3|s;let u=a<<10;for(;r.getBCHDigit(u)-e>=0;)u^=o<<r.getBCHDigit(u)-e;return(a<<10|u)^i},mt}var wt={},_t,Wt;function ze(){if(Wt)return _t;Wt=1;const r=H();function o(i){this.mode=r.NUMERIC,this.data=i.toString()}return o.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t,n,s;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),s=parseInt(n,10),e.put(s,10);const a=this.data.length-t;a>0&&(n=this.data.substr(t),s=parseInt(n,10),e.put(s,a*3+1))},_t=o,_t}var pt,Xt;function Ve(){if(Xt)return pt;Xt=1;const r=H(),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(e){this.mode=r.ALPHANUMERIC,this.data=e}return i.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let s=o.indexOf(this.data[n])*45;s+=o.indexOf(this.data[n+1]),t.put(s,11)}this.data.length%2&&t.put(o.indexOf(this.data[n]),6)},pt=i,pt}var yt,xt;function He(){if(xt)return yt;xt=1;const r=H();function o(i){this.mode=r.BYTE,typeof i=="string"?this.data=new TextEncoder().encode(i):this.data=new Uint8Array(i)}return o.getBitsLength=function(e){return e*8},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(i){for(let e=0,t=this.data.length;e<t;e++)i.put(this.data[e],8)},yt=o,yt}var Ct,$t;function Ke(){if($t)return Ct;$t=1;const r=H(),o=V();function i(e){this.mode=r.KANJI,this.data=e}return i.getBitsLength=function(t){return t*13},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=o.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
  3. Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}},Ct=i,Ct}var Et={exports:{}},te;function Je(){return te||(te=1,(function(r){var o={single_source_shortest_paths:function(i,e,t){var n={},s={};s[e]=0;var a=o.PriorityQueue.make();a.push(e,0);for(var u,c,d,C,g,l,I,T,S;!a.empty();){u=a.pop(),c=u.value,C=u.cost,g=i[c]||{};for(d in g)g.hasOwnProperty(d)&&(l=g[d],I=C+l,T=s[d],S=typeof s[d]>"u",(S||T>I)&&(s[d]=I,a.push(d,I),n[d]=c))}if(typeof t<"u"&&typeof s[t]>"u"){var v=["Could not find a path from ",e," to ",t,"."].join("");throw new Error(v)}return n},extract_shortest_path_from_predecessor_list:function(i,e){for(var t=[],n=e;n;)t.push(n),i[n],n=i[n];return t.reverse(),t},find_path:function(i,e,t){var n=o.single_source_shortest_paths(i,e,t);return o.extract_shortest_path_from_predecessor_list(n,t)},PriorityQueue:{make:function(i){var e=o.PriorityQueue,t={},n;i=i||{};for(n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t.queue=[],t.sorter=i.sorter||e.default_sorter,t},default_sorter:function(i,e){return i.cost-e.cost},push:function(i,e){var t={value:i,cost:e};this.queue.push(t),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};r.exports=o})(Et)),Et.exports}var ee;function Oe(){return ee||(ee=1,(function(r){const o=H(),i=ze(),e=Ve(),t=He(),n=Ke(),s=ce(),a=V(),u=Je();function c(v){return unescape(encodeURIComponent(v)).length}function d(v,N,R){const E=[];let M;for(;(M=v.exec(R))!==null;)E.push({data:M[0],index:M.index,mode:N,length:M[0].length});return E}function C(v){const N=d(s.NUMERIC,o.NUMERIC,v),R=d(s.ALPHANUMERIC,o.ALPHANUMERIC,v);let E,M;return a.isKanjiModeEnabled()?(E=d(s.BYTE,o.BYTE,v),M=d(s.KANJI,o.KANJI,v)):(E=d(s.BYTE_KANJI,o.BYTE,v),M=[]),N.concat(R,E,M).sort(function(p,_){return p.index-_.index}).map(function(p){return{data:p.data,mode:p.mode,length:p.length}})}function g(v,N){switch(N){case o.NUMERIC:return i.getBitsLength(v);case o.ALPHANUMERIC:return e.getBitsLength(v);case o.KANJI:return n.getBitsLength(v);case o.BYTE:return t.getBitsLength(v)}}function l(v){return v.reduce(function(N,R){const E=N.length-1>=0?N[N.length-1]:null;return E&&E.mode===R.mode?(N[N.length-1].data+=R.data,N):(N.push(R),N)},[])}function I(v){const N=[];for(let R=0;R<v.length;R++){const E=v[R];switch(E.mode){case o.NUMERIC:N.push([E,{data:E.data,mode:o.ALPHANUMERIC,length:E.length},{data:E.data,mode:o.BYTE,length:E.length}]);break;case o.ALPHANUMERIC:N.push([E,{data:E.data,mode:o.BYTE,length:E.length}]);break;case o.KANJI:N.push([E,{data:E.data,mode:o.BYTE,length:c(E.data)}]);break;case o.BYTE:N.push([{data:E.data,mode:o.BYTE,length:c(E.data)}])}}return N}function T(v,N){const R={},E={start:{}};let M=["start"];for(let h=0;h<v.length;h++){const p=v[h],_=[];for(let f=0;f<p.length;f++){const B=p[f],m=""+h+f;_.push(m),R[m]={node:B,lastCount:0},E[m]={};for(let y=0;y<M.length;y++){const w=M[y];R[w]&&R[w].node.mode===B.mode?(E[w][m]=g(R[w].lastCount+B.length,B.mode)-g(R[w].lastCount,B.mode),R[w].lastCount+=B.length):(R[w]&&(R[w].lastCount=B.length),E[w][m]=g(B.length,B.mode)+4+o.getCharCountIndicator(B.mode,N))}}M=_}for(let h=0;h<M.length;h++)E[M[h]].end=0;return{map:E,table:R}}function S(v,N){let R;const E=o.getBestModeForData(v);if(R=o.from(N,E),R!==o.BYTE&&R.bit<E.bit)throw new Error('"'+v+'" cannot be encoded with mode '+o.toString(R)+`.
  4. Suggested mode is: `+o.toString(E));switch(R===o.KANJI&&!a.isKanjiModeEnabled()&&(R=o.BYTE),R){case o.NUMERIC:return new i(v);case o.ALPHANUMERIC:return new e(v);case o.KANJI:return new n(v);case o.BYTE:return new t(v)}}r.fromArray=function(N){return N.reduce(function(R,E){return typeof E=="string"?R.push(S(E,null)):E.data&&R.push(S(E.data,E.mode)),R},[])},r.fromString=function(N,R){const E=C(N,a.isKanjiModeEnabled()),M=I(E),h=T(M,R),p=u.find_path(h.map,"start","end"),_=[];for(let f=1;f<p.length-1;f++)_.push(h.table[p[f]].node);return r.fromArray(l(_))},r.rawSplit=function(N){return r.fromArray(C(N,a.isKanjiModeEnabled()))}})(wt)),wt}var ne;function Qe(){if(ne)return rt;ne=1;const r=V(),o=At(),i=Pe(),e=Se(),t=Me(),n=be(),s=Le(),a=ae(),u=ke(),c=Ue(),d=Fe(),C=H(),g=Oe();function l(h,p){const _=h.size,f=n.getPositions(p);for(let B=0;B<f.length;B++){const m=f[B][0],y=f[B][1];for(let w=-1;w<=7;w++)if(!(m+w<=-1||_<=m+w))for(let A=-1;A<=7;A++)y+A<=-1||_<=y+A||(w>=0&&w<=6&&(A===0||A===6)||A>=0&&A<=6&&(w===0||w===6)||w>=2&&w<=4&&A>=2&&A<=4?h.set(m+w,y+A,!0,!0):h.set(m+w,y+A,!1,!0))}}function I(h){const p=h.size;for(let _=8;_<p-8;_++){const f=_%2===0;h.set(_,6,f,!0),h.set(6,_,f,!0)}}function T(h,p){const _=t.getPositions(p);for(let f=0;f<_.length;f++){const B=_[f][0],m=_[f][1];for(let y=-2;y<=2;y++)for(let w=-2;w<=2;w++)y===-2||y===2||w===-2||w===2||y===0&&w===0?h.set(B+y,m+w,!0,!0):h.set(B+y,m+w,!1,!0)}}function S(h,p){const _=h.size,f=c.getEncodedBits(p);let B,m,y;for(let w=0;w<18;w++)B=Math.floor(w/3),m=w%3+_-8-3,y=(f>>w&1)===1,h.set(B,m,y,!0),h.set(m,B,y,!0)}function v(h,p,_){const f=h.size,B=d.getEncodedBits(p,_);let m,y;for(m=0;m<15;m++)y=(B>>m&1)===1,m<6?h.set(m,8,y,!0):m<8?h.set(m+1,8,y,!0):h.set(f-15+m,8,y,!0),m<8?h.set(8,f-m-1,y,!0):m<9?h.set(8,15-m-1+1,y,!0):h.set(8,15-m-1,y,!0);h.set(f-8,8,1,!0)}function N(h,p){const _=h.size;let f=-1,B=_-1,m=7,y=0;for(let w=_-1;w>0;w-=2)for(w===6&&w--;;){for(let A=0;A<2;A++)if(!h.isReserved(B,w-A)){let U=!1;y<p.length&&(U=(p[y]>>>m&1)===1),h.set(B,w-A,U),m--,m===-1&&(y++,m=7)}if(B+=f,B<0||_<=B){B-=f,f=-f;break}}}function R(h,p,_){const f=new i;_.forEach(function(A){f.put(A.mode.bit,4),f.put(A.getLength(),C.getCharCountIndicator(A.mode,h)),A.write(f)});const B=r.getSymbolTotalCodewords(h),m=a.getTotalCodewordsCount(h,p),y=(B-m)*8;for(f.getLengthInBits()+4<=y&&f.put(0,4);f.getLengthInBits()%8!==0;)f.putBit(0);const w=(y-f.getLengthInBits())/8;for(let A=0;A<w;A++)f.put(A%2?17:236,8);return E(f,h,p)}function E(h,p,_){const f=r.getSymbolTotalCodewords(p),B=a.getTotalCodewordsCount(p,_),m=f-B,y=a.getBlocksCount(p,_),w=f%y,A=y-w,U=Math.floor(f/y),O=Math.floor(m/y),fe=O+1,It=U-O,de=new u(It);let Z=0;const Y=new Array(y),Tt=new Array(y);let W=0;const he=new Uint8Array(h.buffer);for(let K=0;K<y;K++){const x=K<A?O:fe;Y[K]=he.slice(Z,Z+x),Tt[K]=de.encode(Y[K]),Z+=x,W=Math.max(W,x)}const X=new Uint8Array(f);let Nt=0,D,k;for(D=0;D<W;D++)for(k=0;k<y;k++)D<Y[k].length&&(X[Nt++]=Y[k][D]);for(D=0;D<It;D++)for(k=0;k<y;k++)X[Nt++]=Tt[k][D];return X}function M(h,p,_,f){let B;if(Array.isArray(h))B=g.fromArray(h);else if(typeof h=="string"){let U=p;if(!U){const O=g.rawSplit(h);U=c.getBestVersionForData(O,_)}B=g.fromString(h,U||40)}else throw new Error("Invalid data");const m=c.getBestVersionForData(B,_);if(!m)throw new Error("The amount of data is too big to be stored in a QR Code");if(!p)p=m;else if(p<m)throw new Error(`
  5. The chosen QR Code version cannot contain this amount of data.
  6. Minimum version required to store current data is: `+m+`.
  7. `);const y=R(p,_,B),w=r.getSymbolSize(p),A=new e(w);return l(A,p),I(A),T(A,p),v(A,_,0),p>=7&&S(A,p),N(A,y),isNaN(f)&&(f=s.getBestMask(A,v.bind(null,A,_))),s.applyMask(f,A),v(A,_,f),{modules:A,version:p,errorCorrectionLevel:_,maskPattern:f,segments:B}}return rt.create=function(p,_){if(typeof p>"u"||p==="")throw new Error("No input text");let f=o.M,B,m;return typeof _<"u"&&(f=o.from(_.errorCorrectionLevel,o.M),B=c.from(_.version),m=s.from(_.maskPattern),_.toSJISFunc&&r.setToSJISFunction(_.toSJISFunc)),M(p,B,f,m)},rt}var Bt={},vt={},re;function le(){return re||(re=1,(function(r){function o(i){if(typeof i=="number"&&(i=i.toString()),typeof i!="string")throw new Error("Color should be defined as hex string");let e=i.slice().replace("#","").split("");if(e.length<3||e.length===5||e.length>8)throw new Error("Invalid hex color: "+i);(e.length===3||e.length===4)&&(e=Array.prototype.concat.apply([],e.map(function(n){return[n,n]}))),e.length===6&&e.push("F","F");const t=parseInt(e.join(""),16);return{r:t>>24&255,g:t>>16&255,b:t>>8&255,a:t&255,hex:"#"+e.slice(0,6).join("")}}r.getOptions=function(e){e||(e={}),e.color||(e.color={});const t=typeof e.margin>"u"||e.margin===null||e.margin<0?4:e.margin,n=e.width&&e.width>=21?e.width:void 0,s=e.scale||4;return{width:n,scale:n?4:s,margin:t,color:{dark:o(e.color.dark||"#000000ff"),light:o(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},r.getScale=function(e,t){return t.width&&t.width>=e+t.margin*2?t.width/(e+t.margin*2):t.scale},r.getImageWidth=function(e,t){const n=r.getScale(e,t);return Math.floor((e+t.margin*2)*n)},r.qrToImageData=function(e,t,n){const s=t.modules.size,a=t.modules.data,u=r.getScale(s,n),c=Math.floor((s+n.margin*2)*u),d=n.margin*u,C=[n.color.light,n.color.dark];for(let g=0;g<c;g++)for(let l=0;l<c;l++){let I=(g*c+l)*4,T=n.color.light;if(g>=d&&l>=d&&g<c-d&&l<c-d){const S=Math.floor((g-d)/u),v=Math.floor((l-d)/u);T=C[a[S*s+v]?1:0]}e[I++]=T.r,e[I++]=T.g,e[I++]=T.b,e[I]=T.a}}})(vt)),vt}var oe;function Ye(){return oe||(oe=1,(function(r){const o=le();function i(t,n,s){t.clearRect(0,0,n.width,n.height),n.style||(n.style={}),n.height=s,n.width=s,n.style.height=s+"px",n.style.width=s+"px"}function e(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}r.render=function(n,s,a){let u=a,c=s;typeof u>"u"&&(!s||!s.getContext)&&(u=s,s=void 0),s||(c=e()),u=o.getOptions(u);const d=o.getImageWidth(n.modules.size,u),C=c.getContext("2d"),g=C.createImageData(d,d);return o.qrToImageData(g.data,n,u),i(C,c,d),C.putImageData(g,0,0),c},r.renderToDataURL=function(n,s,a){let u=a;typeof u>"u"&&(!s||!s.getContext)&&(u=s,s=void 0),u||(u={});const c=r.render(n,s,u),d=u.type||"image/png",C=u.rendererOpts||{};return c.toDataURL(d,C.quality)}})(Bt)),Bt}var Rt={},ie;function je(){if(ie)return Rt;ie=1;const r=le();function o(t,n){const s=t.a/255,a=n+'="'+t.hex+'"';return s<1?a+" "+n+'-opacity="'+s.toFixed(2).slice(1)+'"':a}function i(t,n,s){let a=t+n;return typeof s<"u"&&(a+=" "+s),a}function e(t,n,s){let a="",u=0,c=!1,d=0;for(let C=0;C<t.length;C++){const g=Math.floor(C%n),l=Math.floor(C/n);!g&&!c&&(c=!0),t[C]?(d++,C>0&&g>0&&t[C-1]||(a+=c?i("M",g+s,.5+l+s):i("m",u,0),u=0,c=!1),g+1<n&&t[C+1]||(a+=i("h",d),d=0)):u++}return a}return Rt.render=function(n,s,a){const u=r.getOptions(s),c=n.modules.size,d=n.modules.data,C=c+u.margin*2,g=u.color.light.a?"<path "+o(u.color.light,"fill")+' d="M0 0h'+C+"v"+C+'H0z"/>':"",l="<path "+o(u.color.dark,"stroke")+' d="'+e(d,c,u.margin)+'"/>',I='viewBox="0 0 '+C+" "+C+'"',S='<svg xmlns="http://www.w3.org/2000/svg" '+(u.width?'width="'+u.width+'" height="'+u.width+'" ':"")+I+' shape-rendering="crispEdges">'+g+l+`</svg>
  8. `;return typeof a=="function"&&a(null,S),S},Rt}var se;function Ge(){if(se)return J;se=1;const r=Ne(),o=Qe(),i=Ye(),e=je();function t(n,s,a,u,c){const d=[].slice.call(arguments,1),C=d.length,g=typeof d[C-1]=="function";if(!g&&!r())throw new Error("Callback required as last argument");if(g){if(C<2)throw new Error("Too few arguments provided");C===2?(c=a,a=s,s=u=void 0):C===3&&(s.getContext&&typeof c>"u"?(c=u,u=void 0):(c=u,u=a,a=s,s=void 0))}else{if(C<1)throw new Error("Too few arguments provided");return C===1?(a=s,s=u=void 0):C===2&&!s.getContext&&(u=a,a=s,s=void 0),new Promise(function(l,I){try{const T=o.create(a,u);l(n(T,s,u))}catch(T){I(T)}})}try{const l=o.create(a,u);c(null,n(l,s,u))}catch(l){c(l)}}return J.create=o.create,J.toCanvas=t.bind(null,i.render),J.toDataURL=t.bind(null,i.renderToDataURL),J.toString=t.bind(null,function(n,s,a){return e.render(n,a)}),J}var Ze=Ge();const We=Re(Ze),Xe={class:"carteirinha-page"},xe={class:"card-container"},$e={class:"card-logo-row text-center"},tn=["src"],en=["src"],nn={class:"card-info"},rn={class:"card-info__row"},on={class:"card-info__label"},sn={class:"card-info__value"},an={class:"card-info__row q-pt-sm"},un={class:"card-info__label"},cn={class:"card-info__value"},ln={class:"card-info__row q-pt-sm"},fn={class:"card-info__label"},dn={class:"card-info__value"},hn={class:"card-qr column"},gn={key:2,class:"card-info__row q-pt-sm text-right"},mn={class:"card-info__label text-right"},wn={class:"card-info__value"},_n={key:1,class:"card-body__vertical-content"},pn={class:"card-info card-info--vertical"},yn={class:"card-info__row"},Cn={class:"card-info__label"},En={class:"card-info__value"},Bn={class:"card-info__row q-pt-xs"},vn={class:"card-info__label"},Rn={class:"card-info__value"},An={class:"card-info__row q-pt-xs"},In={class:"card-info__label"},Tn={class:"card-info__value"},Nn={class:"card-info__row q-pt-xs"},Pn={class:"card-info__label"},Sn={class:"card-info__value"},Mn=90,bn=110,Ln={__name:"CarteirinhaPage",setup(r){const o=ge(),i=$(null),e=$(!1),t=me("qrCanvas"),n=$(!1),s=async()=>{if(!i.value?.cpf&&!i.value?.registration)return;await Mt();const a=t.value instanceof Array?t.value[0]:t.value;if(!a)return;const u=`CPF:${i.value.cpf??""}|MAT:${i.value.registration??""}`,c=e.value?bn:Mn;await We.toCanvas(a,u,{width:c,margin:1,color:{dark:"#ffffff",light:"#661d75"}})};return we(e,async()=>{await Mt(),await s()}),_e(async()=>{await o.fetchUser(),i.value=o.user,n.value=!0,await s()}),(a,u)=>(L(),z("div",Xe,[j(Ae,{class:"q-px-sm"}),P("div",xe,[j(pe,{flat:"",class:St(["associado-card",e.value?"card-vertical":"card-horizontal"])},{default:Pt(()=>[P("div",$e,[P("img",{src:Ce(Ie),class:"card-logo",alt:"SerPrati"},null,8,tn)]),P("div",{class:St(["card-body",e.value?"card-body--vertical":"card-body--horizontal"])},[j(Ee,{class:"card-avatar",size:e.value?"100px":"76px"},{default:Pt(()=>[i.value?.photo_url?(L(),z("img",{key:0,src:i.value.photo_url},null,8,en)):(L(),et(Be,{key:1,name:"mdi-account",color:"white",size:e.value?"64px":"40px"},null,8,["size"]))]),_:1},8,["size"]),e.value?tt("",!0):(L(),z(ve,{key:0},[P("div",nn,[P("div",rn,[P("span",on,b(a.$t("common.terms.name")),1),P("span",sn,b(i.value?.name??"—"),1)]),P("div",an,[P("span",un,b(a.$t("common.terms.cpf")),1),P("span",cn,b(i.value?.cpf??"—"),1)]),P("div",ln,[P("span",fn,b(a.$t("associado.registration")),1),P("span",dn,b(i.value?.registration??"—"),1)])]),P("div",hn,[n.value?(L(),z("canvas",{key:0,ref_key:"qrCanvas",ref:t},null,512)):(L(),et(bt,{key:1,color:"white",size:"48px"})),i.value?.expiry_date?(L(),z("div",gn,[P("span",mn,b(a.$t("associado.validity")),1),P("span",wn,b(i.value.expiry_date),1)])):tt("",!0)])],64)),e.value?(L(),z("div",_n,[P("div",pn,[P("div",yn,[P("span",Cn,b(a.$t("common.terms.name")),1),P("span",En,b(i.value?.name??"—"),1)]),P("div",Bn,[P("span",vn,b(a.$t("common.terms.cpf")),1),P("span",Rn,b(i.value?.cpf??"—"),1)]),P("div",An,[P("span",In,b(a.$t("associado.registration")),1),P("span",Tn,b(i.value?.registration??"—"),1)]),P("div",Nn,[P("span",Pn,b(a.$t("associado.validity")),1),P("span",Sn,b(i.value?.expiry_date??"—"),1)])]),n.value?(L(),z("canvas",{key:0,ref_key:"qrCanvas",ref:t,class:"card-qr__canvas"},null,512)):(L(),et(bt,{key:1,color:"white",size:"48px"}))])):tt("",!0)],2)]),_:1},8,["class"]),j(ye,{round:"",flat:"",icon:e.value?"mdi-phone-rotate-landscape":"mdi-phone-rotate-portrait",color:"violet-normal",size:"sm",title:e.value?a.$t("associado.horizontal"):a.$t("associado.vertical"),onClick:u[0]||(u[0]=c=>e.value=!e.value)},null,8,["icon","title"])])]))}},zn=Te(Ln,[["__scopeId","data-v-37c6157a"]]);export{zn as default};