-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathindex.html
More file actions
2153 lines (2051 loc) · 137 KB
/
index.html
File metadata and controls
2153 lines (2051 loc) · 137 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="./app/css/bootstrap.min.css">
<style type="text/css">
:root {
--bs-primary: #287bb5;
--bs-blue: #287bb5;
}
.prevent-select,
label {
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}
/* The min-width should correspond to the "md" breakpoint in bootstrap. */
@media (max-width: 768px) {
/* The search bar should be absolutely positioned for desktop devices and relatively positioned for mobile. */
.find-collapse {
position: relative !important;
}
/* On mobile, remove the arrow on the drop-down elements to avoid cutting off the text. */
.form-select {
padding-right: 0;
background-image: none;
}
.styleButton {
padding-left: 0;
padding-right: 0;
justify-content: center;
}
#fontSize {
width: 100% !important;
}
}
#debugCanvasParentDiv::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
border-radius: 10px;
background-color: #F5F5F5;
}
#debugCanvasParentDiv::-webkit-scrollbar {
width: 6px;
background-color: #F5F5F5;
}
#debugCanvasParentDiv::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
background-color: #555;
}
.collapse:not(.show):not(.collapse-nav) {
display: block !important;
visibility: hidden !important;
height: 0 !important;
}
html {
overflow-y: scroll;
}
.dropdown-item:active {
background-color: #287bb5;
}
.dropdown-item:focus {
background-color: #287bb5;
}
.dropdown-item:hover {
background-color: #287bb5;
}
input[type=range]::-webkit-slider-thumb {
background: #287bb5;
}
.highlightSwatch {
width: 1.25rem;
height: 1.25rem;
border-radius: 3px;
border: 2px solid transparent;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
.highlightSwatch:hover {
border-color: rgba(0, 0, 0, 0.5);
}
.highlightSwatch.active {
border-color: #000;
}
.highlightSwatchNone {
background: #fff;
border-color: #ccc;
}
.highlightSwatchCustom {
background: #ddd;
}
.nav a {
border-bottom: 3px solid transparent !important;
}
/* Subtract height of border from padding */
.nav-tabs .nav-link {
padding-bottom: calc(1rem - 3px) !important;
/* flex-shrink: 1 and min-width: 0 allows the entire bar to fit in one row in small mobile devices. */
flex-shrink: 1;
min-width: 0;
}
.nav a:not(.collapsed) {
border-bottom: 3px solid !important;
}
.btn-info:focus:not(:focus-visible):not(:active) {
outline: none !important;
box-shadow: none !important;
background-color: #369;
}
.btn-info:active {
box-shadow: 0 0 0 0.1rem rgb(82 125 168 / 50%) !important;
}
.btn-check:checked+.btn-secondary,
.btn-secondary.active,
.btn-secondary:active,
.show>.btn-secondary.dropdown-toggle {
color: #000;
background-color: #dddddd;
border-color: #dddddd;
/* border-color: #bdbdbd; */
}
.btn {
transition: none !important;
}
.help-icon {
vertical-align: middle;
margin-left: 0.2rem;
margin-bottom: 0.1rem;
}
div[class*="ttWide"] .tooltip-inner {
max-width: 400px !important;
white-space: pre-line !important;
}
.form-check-input:focus:not(:focus-visible):not(:active) {
outline: none !important;
box-shadow: none !important;
}
.form-check-input:active {
box-shadow: 0 0 0 0.1rem rgb(82 125 168 / 50%) !important
}
.form-switch.form-switch-lg {
margin-bottom: 0.85rem;
/* JUST FOR STYLING PURPOSE */
}
.form-switch.form-switch-lg .form-check-input {
height: 1.5rem;
width: calc(2.5rem + 0.75rem);
border-radius: 4rem;
}
.form-check-input:checked {
background-color: var(--bs-info);
}
.form-check-input:checked {
background-color: var(--bs-info);
}
.upload_dropZone {
border: solid;
border-width: 3px;
color: #0f3c4b;
outline: 2px dashed #c1ddef;
outline-offset: -12px;
transition:
outline-offset 0.2s ease-out,
outline-color 0.3s ease-in-out,
background-color 0.2s ease-out;
}
.upload_dropZone.highlight {
outline-offset: -4px;
outline-color: #0576bd;
background-color: #c8dadf;
}
.tooltip-wide .tooltip-inner {
max-width: 350px;
}
</style>
<meta charset="utf-8" />
<title>Scribe OCR</title>
<meta name="description"
content="Web application for recognizing text from images and PDFs, proofreading OCR results, and creating fully-digitized documents. Free and open source.">
<script src="./app/runFirst.js" defer></script>
<script type="module" src="main.js"></script>
</head>
<!-- position:relative;overflow:hidden prevents an issue on mobile where users can "scroll" into blank space past the end of the content. -->
<body style="position:relative;overflow:hidden">
<div id="navBar" class="navbar fixed-top navbar-light bg-light py-0">
<div class="container-xl px-0">
<div class="container-fluid pe-0" id="user-controls">
<div class="row nav-row">
<!-- The page navbar is moved below the page navigation if the window gets too small. -->
<div class="col-xl-6 order-3 order-xl-1" id="nav-tab-container">
<div class="nav nav-tabs" id="nav-tab" role="tablist" style="flex-wrap:nowrap">
<a class="nav-link collapsed prevent-select" id="nav-recognize-tab" data-bs-toggle="collapse"
data-bs-target="#nav-recognize" type="button" role="tab" aria-controls="nav-recognize">Recognize</a>
<a class="nav-link collapsed prevent-select" id="nav-eval-tab" data-bs-toggle="collapse"
data-bs-target="#nav-eval" type="button" role="tab" aria-controls="nav-eval"
style="display:none">Evaluate</a>
<a class="nav-link collapsed prevent-select" id="nav-view-tab" data-bs-toggle="collapse"
data-bs-target="#nav-view" type="button" role="tab" aria-controls="nav-view">View</a>
<a class="nav-link collapsed prevent-select" id="nav-edit-tab" data-bs-toggle="collapse"
data-bs-target="#nav-edit" type="button" role="tab" aria-controls="nav-edit">Edit</a>
<a class="nav-link collapsed prevent-select" id="nav-layout-tab" data-bs-toggle="collapse"
data-bs-target="#nav-layout" type="button" role="tab" aria-controls="nav-layout"
style="display:none">Layout</a>
<a class="nav-link collapsed prevent-select" id="nav-annotate-tab" data-bs-toggle="collapse"
data-bs-target="#nav-annotate" type="button" role="tab" aria-controls="nav-annotate"
style="display:none">Annotate</a>
<!-- <a class="nav-link collapsed" id="nav-layout-tab" data-bs-toggle="collapse" data-bs-target="#nav-layout" type="button" role="tab" aria-controls="nav-layout">Layout</a> -->
<a class="nav-link collapsed prevent-select" id="nav-download-tab" data-bs-toggle="collapse"
data-bs-target="#nav-download" type="button" role="tab" aria-controls="nav-download">Download</a>
<a class="nav-link collapsed prevent-select" id="nav-about-tab" data-bs-toggle="collapse"
data-bs-target="#nav-about" type="button" role="tab" aria-controls="nav-about">Info</a>
</div>
</div>
<div class="col-md order-2 my-auto">
<div class="btn-group">
<button class="btn btn-info btn-sm" id="prev">Prev</button>
<div style="width:2px"></div>
<button class="btn btn-info btn-sm" id="next">Next</button>
</div>
<!-- Style used instead of "size" property, as it seems to be more consistent across browsers.
Setting the "size" attribute to 4 results in an input that is 4 letters wide on some browsers, while much wider on others. -->
<div class="btn-group">
<label>Page: <input type="text" class="form-control btn-sm" id="pageNum" name="pageNum" autocomplete="off"
style="width:3em;display:inline-block"> / <span id="pageCount"
style="display:inline-block;min-width:0.5rem"></span></label>
</div>
<!-- Zoom buttons only visible on larger screens to avoid cluttering the interface. -->
<div class="btn-group d-none d-xl-inline-flex" style="padding-left:20px;padding-right:20px">
<button class="btn btn-secondary btn-sm" id="zoomOut" aria-label="Zoom Out" style="width:40px">-</button>
<div style="width:2px"></div>
<button class="btn btn-secondary btn-sm" id="zoomIn" aria-label="Zoom In" style="width:40px">+</button>
</div>
<button type="button" class="btn btn-secondary btn-sm" data-bs-toggle="collapse" href="#editFindCollapse"
style="text-align:left">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-search"
viewBox="0 0 16 16">
<path
d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z" />
</svg> Find</button>
<div class="collapse find-collapse" id="editFindCollapse"
style="padding:0;width:100%;max-width:405px;position:absolute;z-index:4">
<div class="card card-body" style="padding:0.5rem;position:relative;top:5px;">
<input type="text" id="editFind" name="find" size="2" style="width:100%" autocomplete="off">
<div class="" role="group" aria-label="First group">
<div class="row">
<div class="col col-md-6">
<span><span id="matchCurrent">0</span>/<span id="matchCount">0</span></span>
</div>
<div class="col col-md-6">
<div class="btn-group" style="width:100%">
<button id="prevMatch" type="button" class="btn btn-secondary btn-sm">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-chevron-up" viewBox="0 0 16 16">
<path fill-rule="evenodd"
d="M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z" />
</svg></button>
<button id="nextMatch" type="button" class="btn btn-secondary btn-sm">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-chevron-down" viewBox="0 0 16 16">
<path fill-rule="evenodd"
d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z" />
</svg></button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-content" id="nav-tabContent">
<div class="collapse collapse-nav" id="nav-layout" role="tabpanel" aria-labelledby="nav-layout-tab"
data-bs-parent="#user-controls">
<div class="row">
<div class="col-1 height-helper" style="width:1px;padding:0"></div>
<div class="col">
<div class="row" style="padding:0.4rem;">
<div class="col col-lg-2">
<label>Layout Elements</label>
<div class="form-group mb-2">
<div class="btn-group" style="width:100%;">
<button type="button" id="addLayoutBox" class="btn btn-secondary btn-sm"
style="width:100%;text-align:left;white-space:nowrap">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-bounding-box-circles" viewBox="0 0 16 16">
<path
d="M2 1a1 1 0 1 0 0 2 1 1 0 0 0 0-2zM0 2a2 2 0 0 1 3.937-.5h8.126A2 2 0 1 1 14.5 3.937v8.126a2 2 0 1 1-2.437 2.437H3.937A2 2 0 1 1 1.5 12.063V3.937A2 2 0 0 1 0 2zm2.5 1.937v8.126c.703.18 1.256.734 1.437 1.437h8.126a2.004 2.004 0 0 1 1.437-1.437V3.937A2.004 2.004 0 0 1 12.063 2.5H3.937A2.004 2.004 0 0 1 2.5 3.937zM14 1a1 1 0 1 0 0 2 1 1 0 0 0 0-2zM2 13a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm12 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2z" />
</svg> Add Region: <span id="layoutBoxType">Order</span></button>
<button type="button" class="btn btn-secondary btn-sm dropdown-toggle dropdown-toggle-split"
data-bs-toggle="dropdown" aria-expanded="false">
<span class="visually-hidden">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item" id="addLayoutBoxTypeOrder">Order</a></li>
<li><a class="dropdown-item" id="addLayoutBoxTypeExclude">Exclude</a></li>
</ul>
</div>
</div>
<div class="btn-group" style="width:100%;">
<button type="button" id="addDataTable" class="btn btn-secondary btn-sm"
style="width:100%;text-align:left">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-table" viewBox="0 0 16 16">
<path
d="M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2zm15 2h-4v3h4zm0 4h-4v3h4zm0 4h-4v3h3a1 1 0 0 0 1-1zm-5 3v-3H6v3zm-5 0v-3H1v2a1 1 0 0 0 1 1zm-4-4h4V8H1zm0-4h4V4H1zm5-3v3h4V4zm4 4H6v3h4z" />
</svg> Add Data Table</button>
</div>
</div>
<div class="col col-lg-2">
<label></label>
<div class="btn-group" style="width:100%;">
<button type="button" id="deleteLayout" class="btn btn-secondary btn-sm"
style="width:100%;text-align:left;display:flex;white-space:nowrap" disabled>
<div>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-trash3" viewBox="0 0 16 16" style="margin-right:4px">
<path
d="M6.5 1h3a.5.5 0 0 1 .5.5v1H6v-1a.5.5 0 0 1 .5-.5ZM11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3A1.5 1.5 0 0 0 5 1.5v1H2.506a.58.58 0 0 0-.01 0H1.5a.5.5 0 0 0 0 1h.538l.853 10.66A2 2 0 0 0 4.885 16h6.23a2 2 0 0 0 1.994-1.84l.853-10.66h.538a.5.5 0 0 0 0-1h-.995a.59.59 0 0 0-.01 0H11Zm1.958 1-.846 10.58a1 1 0 0 1-.997.92h-6.23a1 1 0 0 1-.997-.92L3.042 3.5h9.916Zm-7.487 1a.5.5 0 0 1 .528.47l.5 8.5a.5.5 0 0 1-.998.06L5 5.03a.5.5 0 0 1 .47-.53Zm5.058 0a.5.5 0 0 1 .47.53l-.5 8.5a.5.5 0 1 1-.998-.06l.5-8.5a.5.5 0 0 1 .528-.47ZM8 4.5a.5.5 0 0 1 .5.5v8.5a.5.5 0 0 1-1 0V5a.5.5 0 0 1 .5-.5Z" />
</svg><span class="d-md-none d-inline-block">Delete</span><span
class="d-none d-md-inline-block">Delete Region/Table</span>
</div>
</button>
</div>
<div class="btn-group" style="width:100%;padding-top:0.4rem;">
<div class="form-group" style="width:100%;">
<button type="button" class="btn btn-secondary btn-sm" data-bs-toggle="collapse"
href="#setLayoutBoxInclusionRulesDropdown" style="min-width:100%;text-align:left">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-intersect" viewBox="0 0 16 16">
<path
d="M0 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v2h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-2H2a2 2 0 0 1-2-2V2zm5 10v2a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2v5a2 2 0 0 1-2 2H5zm6-8V2a1 1 0 0 0-1-1H2a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h2V6a2 2 0 0 1 2-2h5z" />
</svg> Set Overlap Rules</button>
</div>
</div>
<div class="collapse" id="setLayoutBoxInclusionRulesDropdown">
<div class="card card-body" style="padding:0.5rem;position:relative;top:5px;">
<div class="btn-group" role="group" aria-label="Basic radio toggle button group">
<input type="radio" class="btn-check" name="btnRadioInclusionRule1"
id="setLayoutBoxInclusionRuleMajority" autocomplete="off" checked>
<label class="btn btn-secondary btn-sm" for="setLayoutBoxInclusionRuleMajority"
style="width:40%">Majority</label>
<input type="radio" class="btn-check" name="btnRadioInclusionRule1"
id="setLayoutBoxInclusionRuleLeft" autocomplete="off">
<label class="btn btn-secondary btn-sm" for="setLayoutBoxInclusionRuleLeft">Left</label>
</div>
<div class="btn-group mt-1" role="group" aria-label="Basic radio toggle button group">
<input type="radio" class="btn-check" name="btnRadioInclusionLevel"
id="setLayoutBoxInclusionLevelWord" autocomplete="off" checked>
<label class="btn btn-secondary btn-sm" for="setLayoutBoxInclusionLevelWord"
style="width:40%">Word</label>
<input type="radio" class="btn-check" name="btnRadioInclusionLevel"
id="setLayoutBoxInclusionLevelLine" autocomplete="off">
<label class="btn btn-secondary btn-sm" for="setLayoutBoxInclusionLevelLine">Line</label>
</div>
</div>
</div>
</div>
<div class="col col-lg-2">
<label>Current Layout</label>
<div class="row">
<div class="form-group">
<button data-bs-toggle="collapse" data-bs-target="#collapseLayoutApplyPages" type="button"
class="btn btn-secondary btn-sm" style="min-width:100%;text-align:left" aria-expanded="true">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-files" viewBox="0 0 16 16">
<path
d="M13 0H6a2 2 0 0 0-2 2 2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h7a2 2 0 0 0 2-2 2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zm0 13V4a2 2 0 0 0-2-2H5a1 1 0 0 1 1-1h7a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1zM3 4a1 1 0 0 1 1-1h7a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4z">
</path>
</svg>
<div style="display:inline"> Apply to Pages</div>
</button>
</div>
<div class="collapse" id="collapseLayoutApplyPages">
<div class="card card-body" style="padding:0.5rem;position:relative;top:5px;">
<div class="row" style="--bs-gutter-x:0">
<div class="col-3">
<input type="text" id="layoutApplyPagesMin" name="pageNum" size="2"
style="width:100%;padding-bottom:0.25rem" autocomplete="off">
</div>
<div class="col-1" style="text-align:center">-</div>
<div class="col-3">
<input type="text" id="layoutApplyPagesMax" name="pageNum" size="2"
style="width:100%;padding-bottom:0.25rem" autocomplete="off">
</div>
<div class="col-1" style="text-align:center"> </div>
<div class="col-4">
<button type="button" id="layoutApplyPages" class="btn btn-info btn-sm" style="width:100%"
disabled>Apply</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="collapse collapse-nav" id="nav-edit" role="tabpanel" aria-labelledby="nav-edit-tab"
data-bs-parent="#user-controls">
<div class="row">
<div class="col-1 height-helper" style="width:1px;padding:0"></div>
<div class="col">
<div class="row" style="padding:0.4rem;">
<div class="col col-lg-2 px-1 px-sm-2">
<label for="wordFont">Font</label>
<select id="wordFont" class="form-select form-select-sm" size="1" disabled>
<option selected value="Default">Default</option>
<option value="SansDefault">Sans</option>
<option value="SerifDefault">Serif</option>
<option value="Carlito">Carlito</option>
<option value="Century">Century</option>
<option value="NimbusMono">Courier</option>
<option value="Garamond">Garamond</option>
<option value="Gothic">Gothic</option>
<option value="Palatino">Palatino</option>
<option value="NimbusRoman">Times</option>
<option value="NimbusSans">Nimbus Sans</option>
</select>
<div class="input-group" style="padding-top:0.4rem;">
<button class="col col-xl-2 col-md-3 btn btn-secondary btn-sm order-0" id="fontMinus"
disabled>-</button>
<input type="text"
class="form-control btn-sm col-12 col-xl-3 col-md-4 order-last order-md-1 mt-2 mt-md-0"
id="fontSize" size="1" style="flex:unset;width:35%" autocomplete="off" disabled>
<button class="col col-md-3 col-xl-2 btn btn-secondary btn-sm order-2" id="fontPlus"
disabled>+</button>
</div>
</div>
<div class="col-1 col-md-3 col-lg-3" style="padding-right:0.25rem;">
<label><span class="d-none d-md-inline-block">Style</span></label>
<div class="row">
<div class="col-12 col-md-4 px-1 px-sm-2 pb-2">
<input type="checkbox" class="btn-check" id="styleItalic" autocomplete="off">
<label class="btn btn-secondary btn-sm styleButton" for="styleItalic"
style="text-align:left;width:100%;display:flex;align-items:center;height:31px">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-type-italic" style="margin-right:4px" viewBox="0 0 16 16">
<path
d="M7.991 11.674 9.53 4.455c.123-.595.246-.71 1.347-.807l.11-.52H7.211l-.11.52c1.06.096 1.128.212 1.005.807L6.57 11.674c-.123.595-.246.71-1.346.806l-.11.52h3.774l.11-.52c-1.06-.095-1.129-.211-1.006-.806z" />
</svg><span class="d-none d-md-inline-block">Italic</span>
</label>
</div>
<div class="col-12 col-md-4 px-1 px-sm-2 pb-2">
<input type="checkbox" class="btn-check" id="styleBold" autocomplete="off">
<label class="btn btn-secondary btn-sm styleButton" for="styleBold"
style="text-align:left;width:100%;display:flex;align-items:center;height:31px">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-type-bold" viewBox="0 0 16 16">
<path
d="M8.21 13c2.106 0 3.412-1.087 3.412-2.823 0-1.306-.984-2.283-2.324-2.386v-.055a2.176 2.176 0 0 0 1.852-2.14c0-1.51-1.162-2.46-3.014-2.46H3.843V13zM5.908 4.674h1.696c.963 0 1.517.451 1.517 1.244 0 .834-.629 1.32-1.73 1.32H5.908V4.673zm0 6.788V8.598h1.73c1.217 0 1.88.492 1.88 1.415 0 .943-.643 1.449-1.832 1.449H5.907z" />
</svg><span class="d-none d-md-inline-block">Bold</span>
</label>
</div>
<div class="col-12 col-md-4 px-1 px-sm-2">
<input type="checkbox" class="btn-check" id="styleSmallCaps" autocomplete="off">
<label class="btn btn-secondary btn-sm styleButton" for="styleSmallCaps"
style="text-align:left;width:100%;display:flex;align-items:center;height:31px">
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" class="bi bi-type"
style="margin-right:4px" fill="currentColor">
<g>
<path
d="m2.244,13.081l0.943,-2.803l3.473,0l0.944,2.803l1.256,0l-3.32,-9.331l-1.218,0l-3.322,9.331l1.244,0zm2.7,-7.923l1.396,4.156l-2.83,0l1.4,-4.156l0.034,0z" />
<path
d="m2.244,13.081l0.943,-2.803l3.473,0l0.944,2.803l1.256,0l-3.32,-9.331l-1.218,0l-3.322,9.331l1.244,0zm2.7,-7.923l1.396,4.156l-2.83,0l1.4,-4.156l0.034,0z" />
<path stroke="null"
d="m10.10862,13.081l0.77225,-2.29546l2.84414,0l0.77307,2.29546l1.02857,0l-2.71884,-7.64143l-0.99746,0l-2.72048,7.64143l1.01875,0zm2.21111,-6.48837l1.14322,3.40347l-2.31757,0l1.1465,-3.40347l0.02784,0z" />
</g>
</svg><span class="d-none d-md-inline-block">Caps</span>
</label>
</div>
<div class="col-12 col-md-4 px-1 px-sm-2">
<input type="checkbox" class="btn-check" id="styleSuper" autocomplete="off">
<label class="btn btn-secondary btn-sm styleButton" for="styleSuper"
style="text-align:left;width:100%;display:flex;align-items:center;height:31px">
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" class="bi bi-type"
style="margin-right:4px" fill="currentColor">
<g>
<path stroke="null"
d="m-0.55033,3.9216zm4.15639,2.67132l0,-0.0815c0,-0.79945 0.56919,-1.51224 1.54717,-1.51224c0.87448,0 1.51871,0.56919 1.51871,1.43074c0,0.80722 -0.54332,1.42427 -1.04395,1.97406l-3.43973,3.81099l0,0.96245l6.18349,0l0,-1.28068l-4.04514,0l0,-0.08926l2.28582,-2.56912c0.84085,-0.93658 1.6002,-1.7231 1.6002,-2.93651c-0.00129,-1.46567 -1.1953,-2.56395 -3.02577,-2.56395c-2.03486,0 -3.05293,1.37641 -3.05293,2.78128l0,0.07374l1.47214,0z" />
<path stroke="null"
d="m7.45353,2.52791zm2.89854,1.8629l0,-0.05684c0,-0.55752 0.39693,-1.05459 1.07894,-1.05459c0.60984,0 1.0591,0.39694 1.0591,0.99776c0,0.56292 -0.3789,0.99324 -0.72802,1.37664l-2.39875,2.65767l0,0.67118l4.31217,0l0,-0.89311l-2.82095,0l0,-0.06224l1.59406,-1.79162c0.58638,-0.65314 1.11593,-1.20164 1.11593,-2.04783c-0.0009,-1.02211 -0.83356,-1.78802 -2.11008,-1.78802c-1.41905,0 -2.12902,0.95987 -2.12902,1.93957l0,0.05143l1.02662,0z" />
</g>
</svg><span class="d-none d-md-inline-block">Super</span>
</label>
</div>
<div class="col-12 col-md-4 px-1 px-sm-2">
<input type="checkbox" class="btn-check" id="styleUnderline" autocomplete="off">
<label class="btn btn-secondary btn-sm styleButton" for="styleUnderline"
style="text-align:left;width:100%;display:flex;align-items:center;height:31px">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-type-underline" viewBox="0 0 16 16">
<path
d="M5.313 3.136h-1.23V9.54c0 2.105 1.47 3.623 3.917 3.623s3.917-1.518 3.917-3.623V3.136h-1.23v6.323c0 1.49-.978 2.57-2.687 2.57s-2.687-1.08-2.687-2.57zM12.5 15h-9v-1h9z" />
</svg>
<span class="d-none d-md-inline-block">Underline</span>
</label>
</div>
</div>
</div>
<div class="col col-lg-2 p-0">
<label class="d-none d-md-inline-block"></label>
<label class="ms-3 d-md-none d-inline-block" style="white-space:nowrap;">Add/Delete Word</label>
<div class="row ms-2">
<div class="col-12 px-1 px-sm-2 pb-2">
<button type="button" id="deleteWord" class="btn btn-secondary btn-sm"
style="width:100%;text-align:left;display:flex;white-space:nowrap" disabled>
<div>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-trash3" viewBox="0 0 16 16" style="margin-right:4px">
<path
d="M6.5 1h3a.5.5 0 0 1 .5.5v1H6v-1a.5.5 0 0 1 .5-.5ZM11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3A1.5 1.5 0 0 0 5 1.5v1H2.506a.58.58 0 0 0-.01 0H1.5a.5.5 0 0 0 0 1h.538l.853 10.66A2 2 0 0 0 4.885 16h6.23a2 2 0 0 0 1.994-1.84l.853-10.66h.538a.5.5 0 0 0 0-1h-.995a.59.59 0 0 0-.01 0H11Zm1.958 1-.846 10.58a1 1 0 0 1-.997.92h-6.23a1 1 0 0 1-.997-.92L3.042 3.5h9.916Zm-7.487 1a.5.5 0 0 1 .528.47l.5 8.5a.5.5 0 0 1-.998.06L5 5.03a.5.5 0 0 1 .47-.53Zm5.058 0a.5.5 0 0 1 .47.53l-.5 8.5a.5.5 0 1 1-.998-.06l.5-8.5a.5.5 0 0 1 .528-.47ZM8 4.5a.5.5 0 0 1 .5.5v8.5a.5.5 0 0 1-1 0V5a.5.5 0 0 1 .5-.5Z" />
</svg><span class="d-md-none d-inline-block">Delete</span><span
class="d-none d-md-inline-block">Delete Word</span>
</div>
</button>
</div>
<div class="col-12 px-1 px-sm-2">
<div class="btn-group" style="width:100%;">
<button type="button" id="recognizeWord" class="btn btn-secondary btn-sm"
style="width:100%;text-align:left;white-space:nowrap" disabled>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-eye" viewBox="0 0 16 16" style="margin-right:4px">
<path
d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z" />
<path
d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z" />
</svg><span class="d-md-none d-inline-block">Recognize</span><span
class="d-none d-md-inline-block">Recognize Word</span></button>
<button type="button" id="recognizeWordDropdown"
class="btn btn-secondary btn-sm dropdown-toggle dropdown-toggle-split"
data-bs-toggle="dropdown" aria-expanded="false" disabled>
<span class="visually-hidden">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu">
<!-- <li><a class="dropdown-item" id="recognizeNumber">Recognize Number</a></li> -->
<li><a class="dropdown-item" id="recognizeArea">Recognize Area</a></li>
<li><a class="dropdown-item" id="addWord">Add Word Manually</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="col col-lg-2">
<label></label>
<div class="row">
<div class="form-group">
<button type="button" id="editBaseline" class="btn btn-secondary btn-sm"
style="min-width:100%;text-align:left;padding-right:0" disabled>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-align-middle" viewBox="0 0 16 16">
<path
d="M6 13a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1v10zM1 8a.5.5 0 0 0 .5.5H6v-1H1.5A.5.5 0 0 0 1 8zm14 0a.5.5 0 0 1-.5.5H10v-1h4.5a.5.5 0 0 1 .5.5z" />
</svg>
<span class="d-inline-block d-sm-none">Baseline</span>
<span class="d-none d-sm-inline-block d-md-none">Adj Baseline</span>
<span class="d-none d-md-inline-block">Adjust Baseline</span>
</button>
</div>
</div>
<div class="collapse" id="collapseRangeBaseline">
<div class="card card-body" style="padding:0.5rem;position:relative;top:5px;">
<input type="range" class="form-range" id="rangeBaseline" max="50">
</div>
</div>
<div class="row">
<div class="form-group" style="margin-top:0.5rem">
<button type="button" class="btn btn-secondary btn-sm" data-bs-toggle="collapse"
href="#editOptions" style="min-width:100%;text-align:left">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-gear" viewBox="0 0 16 16">
<path
d="M8 4.754a3.246 3.246 0 1 0 0 6.492 3.246 3.246 0 0 0 0-6.492zM5.754 8a2.246 2.246 0 1 1 4.492 0 2.246 2.246 0 0 1-4.492 0z" />
<path
d="M9.796 1.343c-.527-1.79-3.065-1.79-3.592 0l-.094.319a.873.873 0 0 1-1.255.52l-.292-.16c-1.64-.892-3.433.902-2.54 2.541l.159.292a.873.873 0 0 1-.52 1.255l-.319.094c-1.79.527-1.79 3.065 0 3.592l.319.094a.873.873 0 0 1 .52 1.255l-.16.292c-.892 1.64.901 3.434 2.541 2.54l.292-.159a.873.873 0 0 1 1.255.52l.094.319c.527 1.79 3.065 1.79 3.592 0l.094-.319a.873.873 0 0 1 1.255-.52l.292.16c1.64.893 3.434-.902 2.54-2.541l-.159-.292a.873.873 0 0 1 .52-1.255l.319-.094c1.79-.527 1.79-3.065 0-3.592l-.319-.094a.873.873 0 0 1-.52-1.255l.16-.292c.893-1.64-.902-3.433-2.541-2.54l-.292.159a.873.873 0 0 1-1.255-.52l-.094-.319zm-2.633.283c.246-.835 1.428-.835 1.674 0l.094.319a1.873 1.873 0 0 0 2.693 1.115l.291-.16c.764-.415 1.6.42 1.184 1.185l-.159.292a1.873 1.873 0 0 0 1.116 2.692l.318.094c.835.246.835 1.428 0 1.674l-.319.094a1.873 1.873 0 0 0-1.115 2.693l.16.291c.415.764-.42 1.6-1.185 1.184l-.291-.159a1.873 1.873 0 0 0-2.693 1.116l-.094.318c-.246.835-1.428.835-1.674 0l-.094-.319a1.873 1.873 0 0 0-2.692-1.115l-.292.16c-.764.415-1.6-.42-1.184-1.185l.159-.291A1.873 1.873 0 0 0 1.945 8.93l-.319-.094c-.835-.246-.835-1.428 0-1.674l.319-.094A1.873 1.873 0 0 0 3.06 4.377l-.16-.292c-.415-.764.42-1.6 1.185-1.184l.292.159a1.873 1.873 0 0 0 2.692-1.115l.094-.319z" />
</svg> Options</button>
</div>
<div class="collapse" id="editOptions">
<div class="card card-body" style="padding:0.5rem;position:relative;top:5px;">
<div class="form-check form-switch">
<label><input class="form-check-input" type="checkbox" id="smartQuotes" checked> Smart
Quotes
<a href="#" class="d-inline-block" data-bs-toggle="tooltip" title=""
data-bs-original-title="Automatically replace straight quotes with curly quotes based on context."
data-bs-placement="right">
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12"
fill="var(--bs-body-color)" class="bi bi-question-circle-fill" viewBox="0 0 16 16"
style="vertical-align:baseline">
<path
d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.496 6.033h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286a.237.237 0 0 0 .241.247zm2.325 6.443c.61 0 1.029-.394 1.029-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94 0 .533.425.927 1.01.927z" />
</svg>
</a>
</label>
</div>
<div class="form-check form-switch">
<label><input class="form-check-input" type="checkbox" id="ligatures"> Ligatures
<a href="#" class="d-inline-block" data-bs-toggle="tooltip" title=""
data-bs-original-title="Use ligatures for common letter pairs like 'fi' and 'fl'."
data-bs-placement="right">
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12"
fill="var(--bs-body-color)" class="bi bi-question-circle-fill" viewBox="0 0 16 16"
style="vertical-align:baseline">
<path
d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.496 6.033h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286a.237.237 0 0 0 .241.247zm2.325 6.443c.61 0 1.029-.394 1.029-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94 0 .533.425.927 1.01.927z" />
</svg>
</a>
</label>
</div>
<div class="form-check form-switch">
<label><input class="form-check-input" type="checkbox" id="kerning" checked> Kerning
</label>
</div>
<div style="position:relative;top:35%">
<input type="file" class="position-absolute invisible" id="fontImport" multiple=""
accept=".ttf,.otf,.woff,.woff2">
<label class="btn btn-secondary btn-sm" for="fontImport" id="fontImportLabel"
style="width:100%;text-align:left;white-space:nowrap">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-upload" viewBox="0 0 16 16" style="margin-right:4px">
<path
d="M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5" />
<path
d="M7.646 1.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 2.707V11.5a.5.5 0 0 1-1 0V2.707L5.354 4.854a.5.5 0 1 1-.708-.708z" />
</svg>Import Font <a href="#" class="d-inline-block" data-bs-toggle="tooltip" title=""
data-bs-original-title="Import your own .ttf, .otf, or .woff font file."
data-bs-placement="right">
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12"
fill="var(--bs-body-color)" class="bi bi-question-circle-fill" viewBox="0 0 16 16"
style="vertical-align:baseline">
<path
d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.496 6.033h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286a.237.237 0 0 0 .241.247zm2.325 6.443c.61 0 1.029-.394 1.029-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94 0 .533.425.927 1.01.927z" />
</svg>
</a>
</label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="collapse collapse-nav" id="nav-annotate" role="tabpanel" aria-labelledby="nav-annotate-tab"
data-bs-parent="#user-controls">
<div class="row">
<div class="col-1 height-helper" style="width:1px;padding:0"></div>
<div class="col">
<div class="row" style="padding-top:0.4rem;padding-bottom:0.4rem;">
<div class="col col-lg-3" style="padding-right:0.25rem;">
<label>Highlight</label>
<input type="checkbox" id="styleHighlight" style="display:none">
<div class="card card-body" style="padding:0.5rem;" id="highlightOptions">
<div class="d-flex align-items-center mb-1">
<label class="me-2"
style="white-space:nowrap;font-size:0.85rem;width:3.2rem;flex-shrink:0">Color</label>
<div class="d-flex align-items-center gap-1" id="highlightColorPresets">
<span class="highlightSwatch highlightSwatchNone active" data-color="none" title="None">
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 16 16"
fill="none" stroke="#999" stroke-width="2">
<line x1="2" y1="2" x2="14" y2="14" />
</svg>
</span>
<span class="highlightSwatch" data-color="#ffe93b" style="background:#ffe93b;"
title="Yellow"></span>
<span class="highlightSwatch" data-color="#4dd0e1" style="background:#4dd0e1;"
title="Cyan"></span>
<span class="highlightSwatch" data-color="#f06292" style="background:#f06292;"
title="Pink"></span>
<span class="highlightSwatch" data-color="#81c784" style="background:#81c784;"
title="Green"></span>
<span class="highlightSwatch" data-color="#ffb74d" style="background:#ffb74d;"
title="Orange"></span>
<label class="highlightSwatch highlightSwatchCustom" for="highlightColor" title="Custom">
<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" fill="currentColor"
viewBox="0 0 16 16">
<path
d="M12.854.146a.5.5 0 0 0-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 0 0 0-.708l-3-3zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.207l6.5-6.5zm-7.468 7.468A.5.5 0 0 1 6 13.5V13h-.5a.5.5 0 0 1-.5-.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.5-.5V10h-.5a.499.499 0 0 1-.175-.032l-.179.178a.5.5 0 0 0-.11.168l-2 5a.5.5 0 0 0 .65.65l5-2a.5.5 0 0 0 .168-.11l.178-.178z" />
</svg>
</label>
</div>
<input type="color" id="highlightColor" value="#ffe93b"
style="position:absolute;width:0;height:0;padding:0;border:none;opacity:0;pointer-events:none">
</div>
<div class="d-flex align-items-center">
<label class="me-2"
style="white-space:nowrap;font-size:0.85rem;width:3.2rem;flex-shrink:0">Opacity</label>
<input type="range" class="form-range" id="highlightOpacity" min="10" max="100" value="50">
</div>
<div class="d-flex align-items-start mt-1" id="highlightCommentWrapper">
<label class="me-2"
style="white-space:nowrap;font-size:0.85rem;width:3.2rem;flex-shrink:0;padding-top:0.25rem;">Note</label>
<textarea class="form-control form-control-sm" id="highlightComment" rows="2"
placeholder="Add a comment..." style="font-size:0.85rem;resize:vertical;" disabled></textarea>
</div>
</div>
</div>
<div class="col-auto" style="padding-right:0.25rem;">
<label>Navigate</label>
<div class="card card-body" style="padding:0.5rem;">
<div class="d-flex align-items-center mb-1">
<span style="font-size:0.85rem;white-space:nowrap;"><span id="annotationCurrent">0</span>/<span
id="annotationCount">0</span></span>
</div>
<div class="btn-group" style="width:100%">
<button id="prevAnnotation" type="button" class="btn btn-secondary btn-sm"
title="Previous annotation">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-chevron-up" viewBox="0 0 16 16">
<path fill-rule="evenodd"
d="M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z" />
</svg></button>
<button id="nextAnnotation" type="button" class="btn btn-secondary btn-sm"
title="Next annotation">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-chevron-down" viewBox="0 0 16 16">
<path fill-rule="evenodd"
d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z" />
</svg></button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="collapse collapse-nav" id="nav-recognize" role="tabpanel" aria-labelledby="nav-recognize-tab"
data-bs-parent="#user-controls">
<div class="row">
<div class="col-1 height-helper" style="width:1px;padding:0"></div>
<div class="col">
<div class="row" style="padding-top:0.4rem;padding-bottom:0.4rem;">
<div class="col-5 col-sm-3 col-lg-2" style="padding-right:0.25rem;">
<label></label>
<button type="button" id="recognizeAll" class="btn btn-info btn-sm" style="min-width:100%;"
disabled>Recognize Text</button>
<div style="display:none;margin-top:0.3rem" id="textractAcceptChargesDiv">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="textractAcceptCharges">
<label class="form-check-label" for="textractAcceptCharges" style="font-size:0.75rem">
<strong>Accept Risks</strong>
</label>
</div>
<div style="font-size:0.7rem;color:#6c757d;padding-left:1.5em">
I understand this feature may contain bugs and users assume the full risk of unexpected cloud
charges.
</div>
</div>
</div>
<div class="col-5 col-sm-3 col-lg-2" id="basicRecognitionOptions">
<div class="prevent-select" style="display:inline-block">
<t>Speed</t>
</div>
<div class="prevent-select" style="float:right;">
<t>Quality</t>
</div>
<div class="row">
<div class="form-group">
<input type="range" class="form-range" min="0" max="1" step="1" id="ocrQuality"
style="padding-top:0.35rem">
</div>
</div>
</div>
<div class="col col-lg-2" style="display:none" id="advancedRecognitionOptions1">
<div>
<label>Models</label>
</div>
<div class="row">
<div class="form-group">
<div class="dropdown">
<button class="btn btn-secondary dropdown btn-sm" type="button" data-bs-toggle="dropdown"
style="width:100%;text-align:left">
<div id="oemLabelText" style="display:inline">Combined</div>
</button>
<ul class="dropdown-menu">
<li><a id="oemLabelOptionLstm" class="dropdown-item" href="#">Tesseract LSTM</a></li>
<li><a id="oemLabelOptionLegacy" class="dropdown-item" href="#">Tesseract Legacy</a></li>
<li><a id="oemLabelOptionCombined" class="dropdown-item" href="#">LSTM + Legacy Combined</a>
</li>
<li><a id="oemLabelOptionTextract"
class="dropdown-item d-flex justify-content-between align-items-center" href="#">AWS
Textract <span class="d-inline-flex align-items-center"><svg
xmlns="http://www.w3.org/2000/svg" width="40" height="16" viewBox="0 0 40 16">
<rect width="40" height="16" rx="3" fill="#6c757d" /><text x="20" y="11.5"
font-family="system-ui,sans-serif" font-size="10" font-weight="600" fill="#fff"
text-anchor="middle">Alpha</text>
</svg><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="#6c757d"
class="bi bi-cloud-fill ms-2" viewBox="0 0 16 16">
<path
d="M4.406 3.342A5.53 5.53 0 0 1 8 2c2.69 0 4.923 2 5.166 4.579C14.758 6.804 16 8.137 16 9.773 16 11.569 14.502 13 12.687 13H3.781C1.708 13 0 11.366 0 9.318c0-1.763 1.266-3.223 2.942-3.593.143-.863.698-1.723 1.464-2.383" />
</svg></span></a></li>
</ul>
</div>
</div>
</div>
<div class="row" style="padding-top:0.4rem;" id="buildOptions">
<div class="form-group">
<div class="dropdown">
<button class="btn btn-secondary dropdown btn-sm" type="button" id="build"
data-bs-toggle="dropdown" style="width:100%;text-align:left">
<div style="display:inline"> Build: </div>
<div id="buildLabelText" style="display:inline">Scribe</div>
</button>
<ul class="dropdown-menu">
<li><a id="buildLabelOptionDefault" class="dropdown-item" href="#">Scribe Tesseract</a></li>
<li><a id="buildLabelOptionVanilla" class="dropdown-item" href="#">Vanilla Tesseract</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="col col-lg-2" style="display:none" id="advancedRecognitionOptions2">
<label>Parameters</label>
<div class="row">
<div class="form-group">
<div class="form-group">
<div class="dropdown">
<button class="btn btn-secondary dropdown btn-sm" type="button" id="psm"
data-bs-toggle="dropdown" style="width:100%;text-align:left">
<div style="display:inline"> Segment: </div>
<div id="psmLabelText" style="display:inline">Automatic</div>
</button>
<ul class="dropdown-menu">
<li><a id="psmLabelOption3" class="dropdown-item" href="#">Automatic</a></li>
<li><a id="psmLabelOption4" class="dropdown-item" href="#">Single Column</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="form-group" style="margin-top:0.4rem">
<button type="button" id="tessParametersCollapseButton" class="btn btn-secondary btn-sm"
data-bs-toggle="collapse" href="#tessParametersCollapse" style="min-width:100%;text-align:left"
aria-expanded="true">Additional Parameters</button>
</div>
<div class="collapse" id="tessParametersCollapse">
<div class="card card-body" style="padding:0.5rem;position:relative;top:5px;">
<textarea class="form-control btn-sm" id="tessParameters" name="tessParameters" size="3"
autocomplete="off"></textarea>
</div>
</div>
</div>
<div class="col col-lg-2" style="display:none" id="advancedRecognitionOptions3">
<label>Options</label>
<div class="row">
<div class="form-group">
<div class="form-check form-switch">
<label><input class="form-check-input" type="checkbox" id="enableUpscale">
Upscale Images</label>
<label><input class="form-check-input" type="checkbox" id="updateConfOnly">
Update Conf Only</label>
<a href="#" data-bs-custom-class="ttWide" class="d-inline-block" data-bs-toggle="tooltip"
title="" data-bs-original-title="When enabled, the text in user-uploaded OCR data is not edited by running recognition.
Recognition will only modify confidence metrics.
When disabled, running recognition may modify user-uploaded OCR data."
data-bs-placement="right">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="var(--bs-body-color)"
class="bi bi-question-circle-fill" viewBox="0 0 16 16" style="vertical-align:baseline">
<path
d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.496 6.033h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286a.237.237 0 0 0 .241.247zm2.325 6.443c.61 0 1.029-.394 1.029-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94 0 .533.425.927 1.01.927z" />
</svg>
</a>
</div>
</div>
</div>
</div>
<div class="col col-lg-2" id="langOptions">
<label>Language</label>
<div class="form-group">
<button data-bs-toggle="collapse" id="langLabel" data-bs-target="#collapseLang" type="button"
class="btn btn-secondary btn-sm collapsed" style="min-width:100%;text-align:left"
aria-expanded="false">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-translate" viewBox="0 0 16 16">
<path
d="M4.545 6.714 4.11 8H3l1.862-5h1.284L8 8H6.833l-.435-1.286zm1.634-.736L5.5 3.956h-.049l-.679 2.022z" />
<path
d="M0 2a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v3h3a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-3H2a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zm7.138 9.995q.289.451.63.846c-.748.575-1.673 1.001-2.768 1.292.178.217.451.635.555.867 1.125-.359 2.08-.844 2.886-1.494.777.665 1.739 1.165 2.93 1.472.133-.254.414-.673.629-.89-1.125-.253-2.057-.694-2.82-1.284.681-.747 1.222-1.651 1.621-2.757H14V8h-3v1.047h.765c-.318.844-.74 1.546-1.272 2.13a6 6 0 0 1-.415-.492 2 2 0 0 1-.94.31" />
</svg>
<div id="langLabelText" style="display:inline"> Lang: Eng</div>
</button>
</div>
</div>
<div class="col col-lg-3" style="display:none" id="textractOptions">
<label>AWS Credentials
<a href="#" class="d-inline-block" data-bs-toggle="tooltip" data-bs-custom-class="ttWide"
title="Requests are sent directly from your browser to AWS. No credentials are stored or transmitted to any other server."
data-bs-placement="right">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="var(--bs-body-color)"
class="bi bi-question-circle-fill" viewBox="0 0 16 16" style="vertical-align:baseline">
<path
d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.496 6.033h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286a.237.237 0 0 0 .241.247zm2.325 6.443c.61 0 1.029-.394 1.029-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94 0 .533.425.927 1.01.927z" />
</svg>
</a>
</label>
<div class="row">
<div class="form-group">
<div class="input-group input-group-sm" style="margin-bottom:0.3rem">
<span class="input-group-text" style="width:40%">Access Key ID</span>
<input type="password" id="textractAccessKeyId" class="form-control btn-sm"
autocomplete="off">
<button class="btn btn-outline-secondary textract-toggle-vis" type="button"
data-target="textractAccessKeyId">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor"
viewBox="0 0 16 16">
<path
d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8M1.173 8a13 13 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5s3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5s-3.879-1.168-5.168-2.457A13 13 0 0 1 1.172 8z" />
<path d="M10.5 8a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0" />
</svg>
</button>
</div>
<div class="input-group input-group-sm" style="margin-bottom:0.3rem">
<span class="input-group-text" style="width:40%">Secret Key</span>
<input type="password" id="textractSecretAccessKey" class="form-control btn-sm"
autocomplete="off">
<button class="btn btn-outline-secondary textract-toggle-vis" type="button"
data-target="textractSecretAccessKey">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor"
viewBox="0 0 16 16">
<path
d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8M1.173 8a13 13 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5s3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5s-3.879-1.168-5.168-2.457A13 13 0 0 1 1.172 8z" />
<path d="M10.5 8a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0" />
</svg>
</button>
</div>
<div class="input-group input-group-sm" style="margin-bottom:0.3rem">
<span class="input-group-text" style="width:40%">Session Token</span>
<input type="password" id="textractSessionToken" class="form-control btn-sm"
autocomplete="off" placeholder="(optional)">
<button class="btn btn-outline-secondary textract-toggle-vis" type="button"
data-target="textractSessionToken">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor"
viewBox="0 0 16 16">
<path
d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8M1.173 8a13 13 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5s3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5s-3.879-1.168-5.168-2.457A13 13 0 0 1 1.172 8z" />
<path d="M10.5 8a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0" />
</svg>
</button>
</div>