1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2224],{82224:function(t,e){var n=function(){},r="23456789CFGHJMPQRVWX",o=r.length,i=[20,1,.05,.0025,125e-6];n.prototype.isValid=function(t){if(!t||-1==t.indexOf("+")||t.indexOf("+")!=t.lastIndexOf("+")||1==t.length||t.indexOf("+")>8||t.indexOf("+")%2==1)return!1;if(t.indexOf("0")>-1){if(0==t.indexOf("0"))return!1;var e=t.match(/(0+)/g);if(e.length>1||e[0].length%2==1||e[0].length>6||"+"!=t.charAt(t.length-1))return!1}if(t.length-t.indexOf("+")-1==1)return!1;t=t.replace(RegExp("\\++"),"").replace(/0+/,"");for(var n=0,o=t.length;n<o;n++){var i=t.charAt(n).toUpperCase();if("+"!=i&&-1==r.indexOf(i))return!1}return!0},n.prototype.isShort=function(t){return!!this.isValid(t)&&!!(t.indexOf("+")>=0&&8>t.indexOf("+"))},n.prototype.isFull=function(t){return!(!this.isValid(t)||this.isShort(t)||r.indexOf(t.charAt(0).toUpperCase())*o>=180||t.length>1&&r.indexOf(t.charAt(1).toUpperCase())*o>=360)},n.prototype.encode=function(t,e,n){if(void 0===n&&(n=10),n<2||n<8&&n%2==1)throw"IllegalArgumentException: Invalid Open Location Code length";t=a(t),e=h(e),90==t&&(t-=l(n));var r=u(t,e,Math.min(n,10));return n>10&&(r+=d(t,e,n-10)),r},n.prototype.decode=function(t){if(!this.isFull(t))throw"IllegalArgumentException: Passed Open Location Code is not a valid full code: "+t;var e=f((t=(t=(t=t.replace("+","")).replace(/0+/,"")).toUpperCase()).substring(0,10));if(t.length<=10)return e;var n=c(t.substring(10));return g(e.latitudeLo+n.latitudeLo,e.longitudeLo+n.longitudeLo,e.latitudeLo+n.latitudeHi,e.longitudeLo+n.longitudeHi,e.codeLength+n.codeLength)},n.prototype.recoverNearest=function(t,e,n){if(!this.isShort(t)){if(this.isFull(t))return t;throw"ValueError: Passed short code is not valid: "+t}e=a(e),n=h(n);var r=8-(t=t.toUpperCase()).indexOf("+"),o=Math.pow(20,2-r/2),i=o/2,l=Math.floor(e/o)*o,u=Math.floor(n/o)*o,d=this.decode(this.encode(l,u).substr(0,r)+t),f=d.latitudeCenter-e;return f>i?d.latitudeCenter-=o:f<-i&&(d.latitudeCenter+=o),(f=d.longitudeCenter-n)>i?d.longitudeCenter-=o:f<-i&&(d.longitudeCenter+=o),this.encode(d.latitudeCenter,d.longitudeCenter,d.codeLength)},n.prototype.shorten=function(t,e,n){if(!this.isFull(t))throw"ValueError: Passed code is not valid and full: "+t;if(-1!=t.indexOf("0"))throw"ValueError: Cannot shorten padded codes: "+t;var t=t.toUpperCase(),r=this.decode(t);if(r.codeLength<6)throw"ValueError: Code length must be at least 6";e=a(e),n=h(n);for(var o=Math.max(Math.abs(r.latitudeCenter-e),Math.abs(r.longitudeCenter-n)),l=i.length-2;l>=1;l--)if(o<.3*i[l])return t.substring((l+1)*2);return t};var a=function(t){return Math.min(90,Math.max(-90,t))},l=function(t){return t<=10?Math.pow(20,Math.floor(-(t/2)+2)):125e-6/Math.pow(5,t-10)},h=function(t){for(;t<-180;)t+=360;for(;t>=180;)t-=360;return t},u=function(t,e,n){for(var o="",a=t+90,l=e+180,h=0;h<n;){var u=i[Math.floor(h/2)],d=Math.floor(a/u);a-=d*u,o+=r.charAt(d),h+=1,d=Math.floor(l/u),l-=d*u,o+=r.charAt(d),8==(h+=1)&&h<n&&(o+="+")}return o.length<8&&(o+=Array(8-o.length+1).join("0")),8==o.length&&(o+="+"),o},d=function(t,e,n){for(var o="",i=125e-6,a=125e-6,l=(t+90)%125e-6,h=(e+180)%125e-6,u=0;u<n;u++){var d=Math.floor(l/(i/5)),f=Math.floor(h/(a/4));i/=5,a/=4,l-=d*i,h-=f*a,o+=r.charAt(4*d+f)}return o},f=function(t){var e=s(t,0),n=s(t,1);return new g(e[0]-90,n[0]-180,e[1]-90,n[1]-180,t.length)},s=function(t,e){for(var n=0,o=0;2*n+e<t.length;)o+=r.indexOf(t.charAt(2*n+e))*i[n],n+=1;return[o,o+i[n-1]]},c=function(t){for(var e=0,n=0,o=125e-6,i=125e-6,a=0;a<t.length;){var l=r.indexOf(t.charAt(a)),h=Math.floor(l/4),u=l%4;o/=5,i/=4,e+=h*o,n+=u*i,a+=1}return g(e,n,e+o,n+i,t.length)},g=n.prototype.CodeArea=function(t,e,n,r,o){return new p.init(t,e,n,r,o)},p={init:function(t,e,n,r,o){this.latitudeLo=t,this.longitudeLo=e,this.latitudeHi=n,this.longitudeHi=r,this.codeLength=o,this.latitudeCenter=Math.min(t+(n-t)/2,90),this.longitudeCenter=Math.min(e+(r-e)/2,180)}};e.Z=n}}]);
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.