mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
PDFs show on phones, drawn with PDF.js
Android shows nothing for a PDF in a frame and iPhones only its first page. On touch screens the document viewer now draws every page with PDF.js 6.5.438 (vendored in public/pdfjs/<version>/, loaded only there); desktop browsers keep their own viewer in the frame. - Pages are drawn as they come near the screen and let go once far from it, so a long manual doesn't use up a phone's memory. - Only the parts of the file those pages need are downloaded: uploaded files now send Accept-Ranges, and PDF.js's background fetch of the whole file is off. - JBIG2/JPEG 2000 scans decode (wasm, with JS fallbacks). Checked on an Android 14 emulator with Chromium 160 (which reports pdfViewerEnabled but can't show a PDF in a frame). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2e8d789975
commit
66fa5f4423
38 files changed
+1236
-1
No files matched your search
@@ -0,0 +1,196 @@
|
||||
// Copyright 2014 The PDFium Authors
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
https://www.apache.org/licenses/
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
1. Definitions.
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
END OF TERMS AND CONDITIONS
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* The copyright in this software is being made available under the 2-clauses
|
||||
* BSD License, included below. This software may be subject to other third
|
||||
* party and contributor rights, including patent rights, and no such rights
|
||||
* are granted under this license.
|
||||
*
|
||||
* Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
|
||||
* Copyright (c) 2002-2014, Professor Benoit Macq
|
||||
* Copyright (c) 2003-2014, Antonin Descampe
|
||||
* Copyright (c) 2003-2009, Francois-Olivier Devaux
|
||||
* Copyright (c) 2005, Herve Drolon, FreeImage Team
|
||||
* Copyright (c) 2002-2003, Yannick Verschueren
|
||||
* Copyright (c) 2001-2003, David Janssens
|
||||
* Copyright (c) 2011-2012, Centre National d'Etudes Spatiales (CNES), France
|
||||
* Copyright (c) 2012, CS Systemes d'Information, France
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
@@ -0,0 +1,13 @@
|
||||
Copyright 2026 Mozilla Foundation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,22 @@
|
||||
Copyright (c) 2024, Mozilla Foundation
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,19 @@
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,21 @@
|
||||
qcms
|
||||
Copyright (C) 2009-2024 Mozilla Corporation
|
||||
Copyright (C) 1998-2007 Marti Maria
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the Software
|
||||
is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
/* THIS FILE IS GENERATED - DO NOT EDIT */
|
||||
export default function A(A){for(var r,f=new Uint8Array(123),e=25;e>=0;--e)f[48+e]=52+e,f[65+e]=e,f[97+e]=26+e;function i(A,r,e){for(var i,a,k=0,b=r,n=e.length,o=r+(3*n>>2)-("="==e[n-2])-("="==e[n-1]);k<n;k+=4)i=f[e.charCodeAt(k+1)],a=f[e.charCodeAt(k+2)],A[b++]=f[e.charCodeAt(k)]<<2|i>>4,b<o&&(A[b++]=i<<4|a>>2),b<o&&(A[b++]=a<<6|f[e.charCodeAt(k+3)]);return A}function a(){throw new Error("abort")}function k(A,f,e){r.copyWithin(A,f,f+e)}function b(A,f,e){if((A>>>=0)+(e>>>=0)>r.length)throw"trap: invalid memory.fill";r.fill(f,A,A+e)}return f[43]=62,f[47]=63,function(A){var f=new ArrayBuffer(16777216),e=new Int8Array(f),n=new Int16Array(f),o=new Int32Array(f),t=new Uint8Array(f),u=new Uint16Array(f),c=new Uint32Array(f),s=(new Float32Array(f),new Float64Array(f)),B=Math.imul,v=(Math.fround,Math.abs),w=Math.clz32,l=Math.min,E=Math.max,Q=Math.floor,g=Math.ceil,C=(Math.trunc,Math.sqrt,A.a),U=C.a,D=C.b,d=C.c,F=C.d,I=C.e,M=C.f,h=C.g,Y=C.h,G=71984,T=0;function R(A,r,f,e){A:{if(!e|(0|r)<0|(0|A)<=(0|r))A=0;else{if((A=r>>>3|0)>>>0>=e>>>0)break A;A=t[A+f|0]>>>(7&~r)&1}return A}a()}function X(A,r,f){var e,i=0,k=0;G=e=G-16|0,Dr(e+8|0,r,f);A:{if(t[e+12|0]){if((i=o[r+16>>2])>>>0<(f=o[e+8>>2])>>>0)break A;if((k=o[r+28>>2])>>>0>i-f>>>0)break A;r=o[r+12>>2],o[A+4>>2]=k,o[A>>2]=r+f}else o[A>>2]=0,o[A+4>>2]=0;return void(G=e+16|0)}a()}function H(A,r){var f=0,i=0,k=0,b=0;if((f=t[r+1|0])>>>0<47){f=B(f,6),k=u[f+1808>>1],i=o[A+8>>2]-k|0,o[A+8>>2]=i,f=f+1808|0;A:if(i>>>0>(b=o[A+4>>2])>>>16>>>0){if(32768&i)return t[0|r];if(i>>>0<k>>>0){i=1^t[0|r],k=t[f+3|0],1==t[f+4|0]&&(e[0|r]=1&i),e[r+1|0]=k,r=1&i;break A}e[r+1|0]=t[f+2|0],r=t[0|r]}else o[A+4>>2]=b-(i<<16),i>>>0<k>>>0?(e[r+1|0]=t[f+2|0],r=t[0|r]):(i=1^t[0|r],b=t[f+3|0],1==t[f+4|0]&&(e[0|r]=1&i),e[r+1|0]=b,r=1&i),o[A+8>>2]=k;for(f=o[A+12>>2];f||(qr(A),f=o[A+12>>2]),f=f-1|0,o[A+12>>2]=f,i=o[A+8>>2],o[A+8>>2]=i<<1,o[A+4>>2]=o[A+4>>2]<<1,!(16384&i););return r}a()}function N(A){return y(A,0),A}function Z(A){var r=0,f=0,e=0,i=0,a=0;(A|=0)&&(f=a=o[(r=A-4|0)>>2],e=r,(0|(A=-2&(i=o[A-8>>2])))!=(0|i)&&(f=o[(e=r-A|0)+4>>2],i=o[e+8>>2],o[f+8>>2]=i,o[i+4>>2]=f,f=A+a|0),(0|(r=o[(A=r+a|0)>>2]))!=o[(A+r|0)-4>>2]&&(a=o[A+4>>2],A=o[A+8>>2],o[a+8>>2]=A,o[A+4>>2]=a,f=r+f|0),o[e>>2]=f,o[((-4&f)+e|0)-4>>2]=1|f,(r=o[e>>2]-8|0)>>>0<=127?A=(r>>>3|0)-1|0:(A=110+((r>>>29-(f=w(r))^4)-(f<<2)|0)|0,r>>>0<=4095||(A=(A=71+((r>>>30-f^2)-(f<<1)|0)|0)>>>0>=63?63:A)),r=A<<4,o[e+4>>2]=r+5328,r=r+5336|0,o[e+8>>2]=o[r>>2],o[r>>2]=e,o[o[e+8>>2]+4>>2]=e,r=o[1590],f=o[1591],e=31&A,(63&A)>>>0>=32?(A=1<<e,i=0):A=(i=1<<e)-1&1>>>32-e,o[1590]=i|r,o[1591]=A|f)}function J(A){return(A=WA(A>>>0<=1?1:A))||(m(),a()),A}function y(A,r){var f;f=o[A>>2],o[A>>2]=r,f&&Z(V(f))}function V(A){var r;return(r=o[A>>2])&&(o[A+4>>2]=r,Z(r)),A}function m(){yr(),a()}function K(A){return VA(A,0),A}function j(A,r){var f=0,e=0,i=0,k=0;A:{if((f=o[A+4>>2])>>>0>(e=o[A+8>>2])+3>>>0){if(e>>>0>=f>>>0|e+1>>>0>=f>>>0|e+2>>>0>=f>>>0)break A;f=r,r=o[A>>2]+e|0,i=f,k=(-16711936&(ie(r=t[0|r]|t[r+1|0]<<8|t[r+2|0]<<16|t[r+3|0]<<24,16)^r))>>>8^ie(r,8),o[i>>2]=k,o[A+8>>2]=o[A+8>>2]+4,A=0}else A=-1;return A}a()}function P(A,r){var f,e,i=0;return G=f=G-16|0,(i=o[(e=r<<2)+o[A+36>>2]>>2])||(r=Jf(J(96),r),i=o[A+36>>2],o[f+12>>2]=0,VA(i+e|0,r),K(f+12|0),i=o[o[A+36>>2]+e>>2]),G=f+16|0,i}function W(A){var r=0,f=0;o[A+12>>2]&&((r=o[A+8>>2]+1|0)&&(f=o[A+4>>2],o[A+8>>2]=r>>>0<f>>>0?r:f),o[A+12>>2]=0)}function x(A){cA(A,0)}function z(A,r){return yf(J(32),o[A>>2],o[r>>2])}function L(A,r){var f,i;return i=o[A>>2],(f=o[A+8>>2])>>>0<c[A+4>>2]?(e[0|r]=t[i+f|0],o[A+8>>2]=o[A+8>>2]+1,A=0):A=-1,A}function S(A){return Jf(J(96),A)}function O(A,r,f){var e,i,a=0,k=0,b=0,n=0,u=0,s=0;for(G=e=G-16|0,i=o[r+44>>2],b=1;;){A:{if(b>>>0>i>>>0)k=-1;else if(k=-1,n=o[A>>2],s=o[n+8>>2],a=o[n>>2],!(c[n+4>>2]<=s>>>0||(a=t[a+s|0]>>>7-o[n+12>>2]&1,o[e+12>>2]=a,ur(n),(0|u)<0))){if(u=a|u<<1,c[r+44>>2]<b>>>0)break A;if((k=o[(a=b<<2)+o[r+48>>2]>>2])>>>0>u>>>0)break A;if((k=u-k|0)>>>0>=c[a+o[r+60>>2]>>2])break A;a=o[(o[r+84>>2]+(o[a+o[r+72>>2]>>2]<<2)|0)+(k<<2)>>2],k=1,1==t[r+1|0]&(0|a)==(o[r+4>>2]-1|0)||(k=-1,-1!=(0|rA(b=o[A>>2],o[(A=a<<2)+o[r+20>>2]>>2],e+12|0))&&(k=0,b=o[A+o[r+32>>2]>>2],A=o[e+12>>2],o[f>>2]=b+((0|a)==(o[r+4>>2]+(t[r+1|0]?-3:-2)|0)?0-A|0:A)))}return G=e+16|0,k}b=b+1|0}}function p(A,r,f){var i,a,k,b=0,n=0,u=0,c=0,s=0;for(G=i=G-16|0,b=2|(a=H(r,o[A>>2]+2|0));;){if(5!=(0|n)){if(b<<=1,b|=u=H(r,b+o[A>>2]|0),u){n=n+1|0;continue}}else n=5;break}for(u=0,c=(0|(c=o[(n<<=3)+2092>>2]))>0?c:0,k=n+2092|0,n=0;(0|n)!=(0|c);)b<<=1,b=(0|(b|=s=H(r,b+o[A>>2]|0)))>255?255&b|256:b,u=u<<1|s,n=n+1|0;return e[i+8|0]=1,o[i+12>>2]=o[k+4>>2],n=0,b=0,t[0|kA(i+8|0,u)]&&(r=(A=o[i+12>>2])>>31,b=!a|!!(0|(n=a?r-(A^r)|0:A))),o[f>>2]=n,G=i+16|0,b}function q(A){var r;r=o[A>>2],o[A>>2]=0,r&&Z(V(r))}function $(A,r){var f=0,i=0,b=0;A:{r:if(f=o[A+4>>2]){if(!o[r+4>>2])for(A=o[A>>2];;){if((0|f)<=0)break r;e[0|A]=0,f=f-1|0,A=A+1|0}if(b=o[r>>2],i=o[r+4>>2],f=o[A>>2],r=0,1&c[A+4>>2]<i>>>0)break A;!(r|i)|!i||k(f,b,i)}return}a()}function _(){vLine truncated
|
||||
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
/* THIS FILE IS GENERATED - DO NOT EDIT */
|
||||
export default function A(A){for(var f,e=new Uint8Array(123),i=25;i>=0;--i)e[48+i]=52+i,e[65+i]=i,e[97+i]=26+i;function r(A,f,i){for(var r,b,a=0,k=f,B=i.length,l=f+(3*B>>2)-("="==i[B-2])-("="==i[B-1]);a<B;a+=4)r=e[i.charCodeAt(a+1)],b=e[i.charCodeAt(a+2)],A[k++]=e[i.charCodeAt(a)]<<2|r>>4,k<l&&(A[k++]=r<<4|b>>2),k<l&&(A[k++]=b<<6|e[i.charCodeAt(a+3)]);return A}e[43]=62,e[47]=63;var b=new ArrayBuffer(16),a=new Int32Array(b),k=(new Float32Array(b),new Float64Array(b));function B(A,f){a[A]=f}function l(){return k[0]}function g(A,e,i){if((A>>>=0)+(i>>>=0)>f.length)throw"trap: invalid memory.fill";f.fill(e,A,A+i)}function o(A,e,i){f.copyWithin(A,e,e+i)}function c(){throw new Error("abort")}return function(A){var e=new ArrayBuffer(16777216),i=new Int8Array(e),b=new Int16Array(e),a=new Int32Array(e),k=new Uint8Array(e),I=new Uint16Array(e),n=new Uint32Array(e),s=new Float32Array(e),G=new Float64Array(e),C=Math.imul,Z=Math.fround,u=(Math.abs,Math.clz32),Q=(Math.min,Math.max,Math.floor),t=Math.ceil,W=(Math.trunc,Math.sqrt,A.a),w=W.a,V=W.b,Y=W.c,H=W.e,F=W.f,v=W.g,m=W.h,E=W.d,y=94048,R=0,J=0,X=0;function d(A,f,e,r){var b,k=0,B=0,l=0;y=b=y-528|0;A:if(A){f:{e:switch(f-1|0){case 0:f=A+12|0;break f;case 1:f=A+16|0,A=A+4|0;break f;case 3:break e;default:break A}f=A+20|0,A=A+8|0}!(f=a[f>>2])|!e||(l=a[A>>2],g(b,0,512),a[b+524>>2]=r,y=A=y-160|0,o(B=A+8|0,25760,144),a[A+52>>2]=b,a[A+28>>2]=b,k=(k=-2-b|0)>>>0>512?512:k,a[A+56>>2]=k,k=b+k|0,a[A+36>>2]=k,a[A+24>>2]=k,Uf(B,e,r),-2!=(0|b)&&(e=a[A+28>>2],i[e-((0|e)==a[A+24>>2])|0]=0),y=A+160|0,i[b+511|0]=0,Ge[0|f](b,l))}y=b+528|0}function U(A){var f=0,e=0,i=0,r=0,b=0;(A|=0)&&(e=b=a[(f=A-4|0)>>2],i=f,(0|(A=-2&(r=a[A-8>>2])))!=(0|r)&&(e=a[(i=f-A|0)+4>>2],r=a[i+8>>2],a[e+8>>2]=r,a[r+4>>2]=e,e=A+b|0),(0|(f=a[(A=f+b|0)>>2]))!=a[(A+f|0)-4>>2]&&(b=a[A+4>>2],A=a[A+8>>2],a[b+8>>2]=A,a[A+4>>2]=b,e=f+e|0),a[i>>2]=e,a[((-4&e)+i|0)-4>>2]=1|e,(f=a[i>>2]-8|0)>>>0<=127?A=(f>>>3|0)-1|0:(A=110+((f>>>29-(e=u(f))^4)-(e<<2)|0)|0,f>>>0<=4095||(A=(A=71+((f>>>30-e^2)-(e<<1)|0)|0)>>>0>=63?63:A)),f=A<<4,a[i+4>>2]=f+27456,f=f+27464|0,a[i+8>>2]=a[f>>2],a[f>>2]=i,a[a[i+8>>2]+4>>2]=i,f=a[7122],e=a[7123],i=31&A,(63&A)>>>0>=32?(A=1<<i,r=0):A=(r=1<<i)-1&1>>>32-i,a[7122]=r|f,a[7123]=A|e)}function h(A,f,e){var r=0;for(a[f>>2]=0,f=f+e|0;(0|e)!=(0|r);)i[0|(f=f-1|0)]=k[0|A],r=r+1|0,A=A+1|0}function D(A,f){return!A|!f?A=0:(A=cA(8,f=C(A,f)))&&Nf(A,0,f),A}function M(A){return A?zA(A):0}function S(A,f,e,i){return f>>>(f=C(i,3))+19&1|A>>>f&170|e>>>f+17&4|A>>>f+16&64|A>>>(i?f+12|0:14)&16}function N(A){return Wf(16,A)}function p(A,f){var e=0,i=0,r=0,b=0,k=0,B=0,l=0,g=0;if(!f)return 0;A:if(A){if(!(f>>>0>4294967239)){i=(B=f>>>0<=8?8:f+3&-4)+8|0,r=a[(b=g=A-4|0)>>2];f:e:{i:{if((0|(e=a[(f=r+b|0)>>2]))!=a[(f+e|0)-4>>2]){if((e=e+r|0)>>>0>=i+16>>>0){r=a[f+4>>2],f=a[f+8>>2],a[r+8>>2]=f,a[f+4>>2]=r,e=e-i|0,a[(f=i+b|0)>>2]=e,a[(f+(-4&e)|0)-4>>2]=1|e,(r=a[f>>2]-8|0)>>>0<=127?k=(r>>>3|0)-1|0:(k=110+((r>>>29-(e=u(r))^4)-(e<<2)|0)|0,r>>>0<=4095||(k=(e=71+((r>>>30-e^2)-(e<<1)|0)|0)>>>0>=63?63:e)),r=(e=k)<<4,a[f+4>>2]=r+27456,r=r+27464|0,a[f+8>>2]=a[r>>2],a[r>>2]=f,a[a[f+8>>2]+4>>2]=f,r=a[7123],f=31&e,(63&e)>>>0>=32?(e=1<<f,k=0):e=(k=1<<f)-1&1>>>32-f,a[7122]=k|a[7122],a[7123]=e|r,a[b>>2]=i,a[(b+(-4&i)|0)-4>>2]=i,e=1;break f}if(e>>>0<i>>>0)break i;i=a[f+4>>2],f=a[f+8>>2],a[i+8>>2]=f,a[f+4>>2]=i,a[b>>2]=e,a[(b+(-4&e)|0)-4>>2]=e,e=1;break f}if(r>>>0>=i+16>>>0){a[b>>2]=i,a[(b+(-4&i)|0)-4>>2]=i,e=r-i|0,a[(f=i+b|0)>>2]=e,a[(f+(-4&e)|0)-4>>2]=1|e,(i=a[f>>2]-8|0)>>>0<=127?e=(i>>>3|0)-1|0:(e=110+((i>>>29-(b=u(i))^4)-(b<<2)|0)|0,i>>>0<=4095||(e=(e=71+((i>>>30-b^2)-(b<<1)|0)|0)>>>0>=63?63:e)),i=e<<4,a[f+4>>2]=i+27456,i=i+27464|0,a[f+8>>2]=a[i>>2],a[i>>2]=f,a[a[f+8>>2]+4>>2]=f,i=a[7123],f=31&e,(63&e)>>>0>=32?(e=1<<f,f=0):(e=(r=1<<f)-1&1>>>32-f,f=r),a[7122]=f|a[7122],a[7123]=e|i,e=1;break f}if(e=1,i>>>0<=r>>>0)break e}e=0}if(e)break A;(f=cA(8,B))&&(aA(f,A,B>>>0<(l=a[g>>2]-8|0)>>>0?B:l),U(A),l=f)}A=l}else A=cA(8,f);return A}function K(A,f,e,i){var r=0,b=0,B=0,l=0,g=0,c=0;if((l=a[A+48>>2])>>>0>=e>>>0)return e&&o(f,a[A+36>>2],e),a[A+36>>2]=a[A+36>>2]+e,a[A+48>>2]=a[A+48>>2]-e,f=a[A+60>>2],f=(i=a[A+56>>2]+e|0)>>>0<e>>>0?f+1|0:f,a[A+56>>2]=i,a[A+60>>2]=f,e;if(4&k[A+68|0])return l&&o(f,a[A+36>>2],l),f=a[A+48>>2],a[A+48>>2]=0,a[A+36>>2]=f+a[A+36>>2],B=a[A+60>>2],B=(e=f)>>>0>(f=a[A+56>>2]+f|0)>>>0?B+1|0:B,a[A+56>>2]=f,a[A+60>>2]=B,l||-1;l?(l&&o(f,a[A+36>>2],l),g=a[A+32>>2],a[A+36>>2]=g,r=a[A+48>>2],a[A+48>>2]=0,b=a[A+60>>2],b=(B=a[A+56>>2]+r|0)>>>0<r>>>0?b+1|0:b,a[A+56>>2]=B,a[A+60>>2]=b,e=e-r|0,f=f+r|0):(g=a[A+32>>2],a[A+36>>2]=g);A:{for(;;){f:{r=a[A>>2],b=a[A+16>>2];e:{if((B=a[A+64>>2])>>>0>e>>>0){if(b=0|Ge[0|b](g,B,r),a[A+48>>2]=b,-1==(0|b))break A;if(e>>>0>b>>>0){b&&o(f,a[A+36>>2],b),g=a[A+32>>2],a[A+36>>2]=g,r=a[A+48>>2];break e}return e&&o(f,a[A+36>>2],e),a[A+36>>2]=a[A+36>>2]+e,a[A+48>>2]=a[A+48>>2]-e,f=a[A+60>>2],f=(i=a[A+56>>2]+e|0)>>>0<e>>>0?f+1|0:f,a[A+56>>2]=i,a[A+60>>2]=f,e+l|0}if(r=0|Ge[0|b](f,e,r),a[A+48>>2]=r,-1==(0|r))break A;if(e>>>0<=r>>>0)breaLine truncated
|
||||
Binary file not shown.
Reference in new issue
Block a user