PageSourceSearch

https://letsbookfor.com/_next/static/chunks/5614.8597c6e73a5b6e56.js

js letsbookfor.com collected 2026-10-09 00:35:53 UTC 12,880 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5614],{95614:(e,t,i)=>{i.r(t),i.d(t,{BitmapFont:()=>C});var s=i(2193),n=i(55494),r=i(4665),a=i(18702),h=i(90222);class l extends a.A{constructor(){super(...arguments),this.chars=Object.create(null),this.lineHeight=0,this.fontFamily="",this.fontMetrics={fontSize:0,ascent:0,descent:0},this.baseLineOffset=0,this.distanceField={type:"none",range:0},this.pages=[],this.applyFillAsTint=!0,this.baseMeasurementFontSize=100,this.baseRenderedFontSize=100}get font(){return(0,h.t6)(h.lj,"BitmapFont.font is deprecated, please use BitmapFont.fontFamily instead."),this.fontFamily}get pageTextures(){return(0,h.t6)(h.lj,"BitmapFont.pageTextures is deprecated, please use BitmapFont.pages instead."),this.pages}get size(){return(0,h.t6)(h.lj,"BitmapFont.size is deprecated, please use BitmapFont.fontMetrics.fontSize instead."),this.fontMetrics.fontSize}get distanceFieldRange(){return(0,h.t6)(h.lj,"BitmapFont.distanceFieldRange is deprecated, please use BitmapFont.distanceField.range instead."),this.distanceField.range}get distanceFieldType(){return(0,h.t6)(h.lj,"BitmapFont.distanceFieldType is deprecated, please use BitmapFont.distanceField.type instead."),this.distanceField.type}destroy(e=!1){for(let e in this.emit("destroy",this),this.removeAllListeners(),this.chars)this.chars[e].texture?.destroy();this.chars=null,e&&(this.pages.forEach(e=>e.texture.destroy(!0)),this.pages=null)}}var o=i(9437),d=i(40981),c=i(35610),p=i(39528),u=i(45785),f=i(46098),g=i(92008),w=i(21735),m=i(56450),x=i(37982),y=i(93374);let _=class e extends l{constructor(t){super(),this.resolution=1,this.pages=[],this._padding=0,this._measureCache=Object.create(null),this._currentChars=[],this._currentX=0,this._currentY=0,this._currentMaxCharHeight=0,this._currentPageIndex=-1,this._skipKerning=!1;let i={...e.defaultOptions,...t};this._textureSize=i.textureSize,this._mipmap=i.mipmap;let s=i.style.clone();i.overrideFill&&(s._fill.color=0xffffff,s._fill.alpha=1,s._fill.texture=r.g.WHITE,s._fill.fill=null),this.applyFillAsTint=i.overrideFill;let n=s.fontSize;s.fontSize=this.baseMeasurementFontSize;let a=(0,x.Z)(s);i.overrideSize?(s._stroke&&(s._stroke.width*=this.baseRenderedFontSize/n),s.dropShadow&&(s.dropShadow.blur*=this.baseRenderedFontSize/n,s.dropShadow.distance*=this.baseRenderedFontSize/n)):s.fontSize=this.baseRenderedFontSize=n,this._style=s,this._skipKerning=i.skipKerning??!1,this.resolution=i.resolution??1,this._padding=i.padding??4,i.textureStyle&&(this._textureStyle=i.textureStyle instanceof m.n?i.textureStyle:new m.n(i.textureStyle)),this.fontMetrics=p.P.measureFont(a),this.lineHeight=s.lineHeight||this.fontMetrics.fontSize||s.fontSize}ensureCharacters(e){let t,i=p.P.graphemeSegmenter(e).filter(e=>!this._currentChars.includes(e)).filter((e,t,i)=>i.indexOf(e)===t);if(!i.length)return;this._currentChars=[...this._currentChars,...i];let{canvas:s,context:a}=(t=-1===this._currentPageIndex?this._nextPage():this.pages[this._currentPageIndex]).canvasAndContext,h=t.texture.source,l=this._style,o=this._currentX,d=this._currentY,c=this._currentMaxCharHeight,u=this.baseRenderedFontSize/this.baseMeasurementFontSize,f=(l.dropShadow?.distance??0)+(l._stroke?.width??0),g=this._padding+f,w=!1,m=s.width/this.resolution,x=s.height/this.resolution;for(let e=0;e<i.length;e++){let t=i[e],f=p.P.measureText(t,l,s,!1);f.lineHeight=f.height;let y=f.width*u,_=Math.ceil(("italic"===l.fontStyle?2:1)*y),S=f.height*u,F=_+2*g,z=S+2*g;if(w=!1,"\n"!==t&&"\r"!==t&&"	"!==t&&" "!==t&&(w=!0,c=Math.ceil(Math.max(z,c))),o+F>m&&(o=0,(d+=c)+(c=z)>x)){h.update();let e=this._nextPage();s=e.canvasAndContext.canvas,a=e.canvasAndContext.context,h=e.texture.source,o=0,d=0,c=0}let b=a.measureText(t).width/u;if(this.chars[t]={id:t.codePointAt(0),xOffset:-(g/u),yOffset:-(g/u),xAdvance:b,kerning:{}},w){this._drawGlyph(a,f,o+g,d+g,u,l);let e=h.width*u,i=h.height*u,s=new n.M(o/e*h.width,d/i*h.height,F/e*h.width,z/i*h.height);this.chars[t].texture=new r.g({source:h,frame:s}),o+=Math.ceil(F)}}h.update(),this._currentX=o,this._currentY=d,this._currentMaxCharHeight=c,this._skipKerning||this._applyKerning(i,a,u)}get pageTextures(){return(0,h.t6)(h.lj,"BitmapFont.pageTextures is deprecated, please use BitmapFont.pages instead."),this.pages}_applyKerning(e,t,i){let s=this._measureCache;for(let n=0;n<e.length;n++){let r=e[n];for(let e=0;e<this._currentChars.length;e++){let n=this._currentChars[e],a=s[r];a||(a=s[r]=t.measureText(r).width);let h=s[n];h||(h=s[n]=t.measureText(n).width);let l=t.measureText(r+n).width,o=l-(a+h);o&&this.chars[r]&&(this.chars[r].kerning[n]=o/i),(o=(l=t.measureText(r+n).width)-(a+h))&&this.chars[n]&&(this.chars[n].kerning[r]=o/i)}}}_nextPage(){this._currentPageIndex++;let e=this.resolution,t=g.N.getOptimalCanvasAndContext(this._textureSize,this._textureSize,e);this._setupContext(t.context,this._style,e);let i=e*(this.baseRenderedFontSize/this.baseMeasurementFontSize),s=new r.g({source:new w.b({resource:t.canvas,resolution:i,alphaMode:"premultiply-alpha-on-upload",autoGenerateMipmaps:this._mipmap})});this._textureStyle&&(s.source.style=this._textureStyle);let n={canvasAndContext:t,texture:s};return this.pages[this._currentPageIndex]=n,n}_setupContext(e,t,i){t.fontSize=this.baseRenderedFontSize,e.scale(i,i),e.font=(0,x.Z)(t),t.fontSize=this.baseMeasurementFontSize,e.textBaseline=t.textBaseline;let s=t._stroke,n=s?.width??0;if(s&&(e.lineWidth=n,e.lineJoin=s.join,e.miterLimit=s.miterLimit,e.strokeStyle=(0,y.r)(s,e)),t._fill&&(e.fillStyle=(0,y.r)(t._fill,e)),t.dropShadow){let s=t.dropShadow,n=f.Q.shared.setValue(s.color).toArray(),r=s.blur*i,a=s.distance*i;e.shadowColor=`rgba(${255*n[0]},${255*n[1]},${255*n[2]},${s.alpha})`,e.shadowBlur=r,e.shadowOffsetX=Math.cos(s.angle)*a,e.shadowOffsetY=Math.sin(s.angle)*a}else e.shadowColor="black",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0}_drawGlyph(e,t,i,s,n,r){let a=t.text,h=t.fontProperties,l=r._stroke,o=(l?.width??0)*n,d=i+o/2,c=s-o/2,p=h.descent*n,u=t.lineHeight*n,f=!1;r.stroke&&o&&(f=!0,e.strokeText(a,d,c+u-p));let{shadowBlur:g,shadowOffsetX:w,shadowOffsetY:m}=e;r._fill&&(f&&(e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0),e.fillText(a,d,c+u-p)),f&&(e.shadowBlur=g,e.shadowOffsetX=w,e.shadowOffsetY=m)}destroy(){super.destroy();for(let e=0;e<this.pages.length;e++){let{canvasAndContext:t,texture:i}=this.pages[e];g.N.returnCanvasAndContext(t),i.destroy(!0)}this.pages=null}};_.defaultOptions={textureSize:512,style:new u.x,mipmap:!0};var S=i(13920);let F=0;class z{constructor(){this.ALPHA=[["a","z"],["A","Z"]," "],this.NUMERIC=[["0","9"]],this.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "],this.ASCII=[[" ","~"]],this.defaultOptions={chars:this.ALPHANUMERIC,resolution:1,padding:4,skipKerning:!1,textureStyle:null},this.measureCache=(0,o.g)(1e3)}getFont(e,t){let i=`${t.fontFamily}-bitmap`,s=!0;if(d.l.has(i)){let t=d.l.get(i);return t.ensureCharacters?.(e),t}if(t._fill.fill&&!t._stroke?(i+=t._fill.fill.styleKey,s=!1):(t._stroke||t.dropShadow)&&(i=`${t.styleKey}-bitmap`,s=!1),i+=`-${t.fontStyle}`,i+=`-${t.fontVariant}`,i+=`-${t.fontWeight}`,!d.l.has(i)){let e=Object.create(t);e._lineHeight=0;let n=new _({style:e,overrideFill:s,overrideSize:!0,...this.defaultOptions});++F>50&&(0,c.R)("BitmapText",`You have dynamically created ${F} bitmap fonts, this can be inefficient. Try pre installing your font styles using \`BitmapFont.install({name:"style1", style})\``),n.once("destroy",()=>{F--,d.l.remove(i)}),d.l.set(i,n)}let n=d.l.get(i);return n.ensureCharacters?.(e),n}getLayout(e,t,i=!0){let s=this.getFont(e,t),n=`${e}-${t.styleKey}-${i}`;if(this.measureCache.has(n))return this.measureCache.get(n);let r=function(e,t,i,s){let n={width:0,height:0,offsetY:0,scale:t.fontSize/i.baseMeasurementFontSize,lines:[{width:0,charPositions:[],spaceWidth:0,spacesIndex:[],chars:[]}]};n.offsetY=i.baseLineOffset;let r=n.lines[0],a=null,h=!0,l={spaceWord:!1,width:0,start:0,index:0,positions:[],chars:[]},o=i.baseMeasurementFontSize/t.fontSize,d=t.letterSpacing*o,c=t.wordWrapWidth*o,p=t.lineHeight?t.lineHeight*o:i.lineHeight,u=t.wordWrap&&t.breakWords,f=(0,S.j3)(t.whiteSpace),g=(0,S.fo)(t.whiteSpace);if(f||g){let t=[],i=f;for(let s=0;s<e.length;s++){let n=e[s];if("\r"===n||"\n"===n)if(g)"\r"===n&&"\n"===e[s+1]&&s++,n=" ";else{f&&(i=!0),t.push(n);continue}if((0,S.U2)(n))if(f&&(0,S.jE)(n)){if(i)continue;i=!0,t.push(" ")}else i=!1,t.push(n);else i=!1,t.push(n)}e=t}let w=e=>{let t=r.width;for(let i=0;i<l.index;i++){let s=e.positions[i];r.chars.push(e.chars[i]),r.charPositions.push(s+t)}
1r.width+=e.width,(l.index>0||!f)&&(h=!1),l.width=0,l.index=0,l.chars.length=0},m=()=>{let e=r.chars.length-1;if(s){let t=r.chars[e];for(;(0,S.jE)(t);)r.width-=i.chars[t].xAdvance,r.spacesIndex.pop(),t=r.chars[--e]}n.width=Math.max(n.width,r.width),r={width:0,charPositions:[],chars:[],spaceWidth:0,spacesIndex:[]},h=!0,n.lines.push(r),n.height+=p},x=e=>e-d>c;for(let s=0;s<e.length+1;s++){let n,o=s===e.length;o||(n=e[s]);let c=i.chars[n];if(/(?:\s)/.test(n)||"\r"===n||"\n"===n||o){if(!h&&t.wordWrap&&x(r.width+l.width)?m():l.start=r.width,w(l),o||r.charPositions.push(0),"\r"===n||"\n"===n)m();else if(!o&&c){let e=c.xAdvance+(c.kerning?.[a]||0)+d;r.width+=e,r.spaceWidth=e,r.spacesIndex.push(r.charPositions.length),r.chars.push(n)}}else if(c){let e=c.kerning?.[a]||0,i=c.xAdvance+e+d;u&&x(l.width+i)&&(h||m(),w(l),m()),l.positions[l.index++]=l.width+e,l.chars.push(n),l.width+=i,(0,S.yp)(n)&&(!h&&t.wordWrap&&x(r.width+l.width)&&m(),w(l))}a=n}return m(),t.wordWrap&&"left"!==t.align&&(n.width=Math.max(n.width,c)),"center"===t.align?function(e){for(let t=0;t<e.lines.length;t++){let i=e.lines[t],s=e.width/2-i.width/2;for(let e=0;e<i.charPositions.length;e++)i.charPositions[e]+=s}}(n):"right"===t.align?function(e){for(let t=0;t<e.lines.length;t++){let i=e.lines[t],s=e.width-i.width;for(let e=0;e<i.charPositions.length;e++)i.charPositions[e]+=s}}(n):"justify"===t.align&&function(e){let t=e.width;for(let i=0;i<e.lines.length-2;i++){let s=e.lines[i],n=0,r=s.spacesIndex[n++],a=0,h=s.spacesIndex.length,l=(t-s.width)/h;for(let e=0;e<s.charPositions.length;e++)e===r&&(r=s.spacesIndex[n++],a+=l),s.charPositions[e]+=a}}(n),n}(p.P.graphemeSegmenter(e),t,s,i);return this.measureCache.set(n,r),r}measureText(e,t,i=!0){return this.getLayout(e,t,i)}install(...e){let t=e[0];"string"==typeof t&&(t={name:t,style:e[1],chars:e[2]?.chars,resolution:e[2]?.resolution,padding:e[2]?.padding,skipKerning:e[2]?.skipKerning},(0,h.t6)(h.lj,"BitmapFontManager.install(name, style, options) is deprecated, use BitmapFontManager.install({name, style, ...options})"));let i=t?.name;if(!i)throw Error("[BitmapFontManager] Property `name` is required.");let s=(t={...this.defaultOptions,...t}).style,n=s instanceof u.x?s:new u.x(s),r=t.dynamicFill??this._canUseTintForStyle(n),a=new _({style:n,overrideFill:r,skipKerning:t.skipKerning,padding:t.padding,resolution:t.resolution,overrideSize:!1,textureStyle:t.textureStyle}),l=function(e){if(""===e)return[];"string"==typeof e&&(e=[e]);let t=[];for(let i=0,s=e.length;i<s;i++){let s=e[i];if(Array.isArray(s)){if(2!==s.length)throw Error(`[BitmapFont]: Invalid character range length, expecting 2 got ${s.length}.`);if(0===s[0].length||0===s[1].length)throw Error("[BitmapFont]: Invalid character delimiter.");let e=s[0].charCodeAt(0),i=s[1].charCodeAt(0);if(i<e)throw Error("[BitmapFont]: Invalid character range.");for(let s=e;s<=i;s++)t.push(String.fromCharCode(s))}else t.push(...Array.from(s))}if(0===t.length)throw Error("[BitmapFont]: Empty set when resolving characters.");return t}(t.chars);return a.ensureCharacters(l.join("")),d.l.set(`${i}-bitmap`,a),a.once("destroy",()=>d.l.remove(`${i}-bitmap`)),a}uninstall(e){let t=`${e}-bitmap`,i=d.l.get(t);i&&i.destroy()}_canUseTintForStyle(e){return!e._stroke&&(!e.dropShadow||0===e.dropShadow.color)&&!e._fill.fill&&0xffffff===e._fill.color}}let b=new z;class C extends l{constructor(e,t){super();let{textures:i,data:a}=e;Object.keys(a.pages).forEach(e=>{let t=i[a.pages[parseInt(e,10)].id];this.pages.push({texture:t})}),Object.keys(a.chars).forEach(e=>{let t=a.chars[e],{frame:h,source:l,rotate:o}=i[t.page],d=s.E.transformRectCoords(t,h,o,new n.M),c=new r.g({frame:d,orig:new n.M(0,0,t.width,t.height),source:l,rotate:o});this.chars[e]={id:e.codePointAt(0),xOffset:t.xOffset,yOffset:t.yOffset,xAdvance:t.xAdvance,kerning:t.kerning??{},texture:c}}),this.baseRenderedFontSize=a.fontSize,this.baseMeasurementFontSize=a.fontSize,this.fontMetrics={ascent:0,descent:0,fontSize:a.fontSize},this.baseLineOffset=a.baseLineOffset,this.lineHeight=a.lineHeight,this.fontFamily=a.fontFamily,this.distanceField=a.distanceField??{type:"none",range:0},this.url=t}destroy(){super.destroy();for(let e=0;e<this.pages.length;e++){let{texture:t}=this.pages[e];t.destroy(!0)}this.pages=null}static install(e){b.install(e)}static uninstall(e){b.uninstall(e)}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.