1"use strict";(self.webpackChunksuttacentral=self.webpackChunksuttacentral||[]).push([[7877],{615:function(t,e,a){a.a(t,(async function(t,i){try{a.d(e,{tt:function(){return o}});var s=a(3182);let n=[],r=[];try{r=await(await fetch(`${s.Sw}/fallen_leaves`)).json();for(const l of r)for(const c of l.fallen_leaves)n=[...n,...Object.values(c)];n=n.flat(1/0)}catch(h){console.error(h)}function o(t){return n.includes(t)}i()}catch(d){i(d)}}),1)},3259:function(t,e,a){var i=a(6337),s=a(9322),n=a(3182);const r=document.createElement("template");r.innerHTML='<link href="/node_modules/viewerjs/dist/viewer.min.css" rel="stylesheet">',document.head.appendChild(r.content);class o extends i.WF{static properties={division:{type:String},vol:{type:String},pageNumber:{type:Number},isLoading:{type:Boolean},lastError:{type:Object},imageData:{type:Array},viewer:{type:Object},lastDetail:{type:Object}};static styles=i.AH` 2 .hide { 3 display: none; 4 } 5 `;constructor(){super(),this.division="",this.vol="",this.pageNumber=0,this.isLoading=!1,this.lastError={},this.imageData=[],this.viewer={},this.lastDetail={}}render(){return i.qy` 6 <ul id="images" class="hide"> 7 ${this.imageData?i.qy` 8 ${this.imageData.map((t=>i.qy` 9 <li> 10 <img 11 class="image" 12 data-url=${this._getImageUrl(t.name)} 13 alt=${t.name} 14 /> 15 </li> 16 `))} 17 `:""} 18 </ul> 19 `}showImage(t){t&&!this._didDetailChange(t)&&(this.lastDetail=t,this.division=t.division,this.vol=t.vol,this.pageNumber=t.pageNumber,this._fetchImageData())}async _fetchImageData(){this.isLoading=!0;try{this.imageData=await(await fetch(this._getUrl())).json(),this._handleResponse()}catch(t){this.lastError=t}this.isLoading=!1}_didDetailChange(t){return!(!this.lastDetail||t.vol!==this.lastDetail.vol||t.division!==this.lastDetail.division||t.pageNumber!==this.lastDetail.pageNumber)}_getUrl(){return`${n.Sw}/images/${this.division}/${this.vol}/${this.pageNumber}`}_getImageUrl(t){return`${n.cl}/${t}`}_handleResponse(){if(!this.imageData||!this.imageData[0])return;let t=0;for(let e=0;e<this.imageData.length;e++)this.imageData[e].pageNumber===this.pageNumber&&(t=e);requestAnimationFrame((()=>{this.viewer?this.viewer.update():this.viewer=new s.A(this.shadowRoot.getElementById("images"),{url:t=>t.dataUrl,navbar:!1,transition:!1,toolbar:{zoomIn:1,zoomOut:1,oneToOne:2,reset:0,prev:1,play:0,next:1,rotateLeft:0,rotateRight:0,flipHorizontal:0,flipVertical:0}}),this.viewer.index=t,this.viewer.show(),this.lastDetail={}}))}}customElements.define("sc-text-image",o)},4243:function(t,e,a){a.a(t,(async function(t,i){try{a.d(e,{n:function(){return t}});var s=a(3182);let t=[];try{const e=await fetch(`${s.Sw}/pali_reference_edition`);t=await e.json()}catch(t){console.error("Failed to fetch paliReferenceEditions:",t)}i()}catch(t){i(t)}}),1)},4666:function(t,e,a){a.d(e,{C4:function(){return x},FA:function(){return g},GB:function(){return c},GS:function(){return m},HB:function(){return n},K9:function(){return h},Kl:function(){return p},LN:function(){return f},SF:function(){return d},f7:function(){return o},fR:function(){return l},hi:function(){return r},ik:function(){return u},jf:function(){return S},sK:function(){return y},se:function(){return s}});var i=a(6337);const s=i.AH` 20 main { 21 display: flex; 22 justify-content: center; 23 } 24 25 p { 26 -webkit-hyphens: auto; 27 -webkit-hyphenate-limit-before: 3; 28 -webkit-hyphenate-limit-after: 3; 29 -webkit-hyphenate-limit-chars: 6 3 3; 30 -webkit-hyphenate-limit-lines: 2; 31 -webkit-hyphenate-limit-last: always; 32 -webkit-hyphenate-limit-zone: 8%; 33 -moz-hyphens: auto; 34 -moz-hyphenate-limit-chars: 6 3 3; 35 -moz-hyphenate-limit-lines: 2; 36 -moz-hyphenate-limit-last: always; 37 -moz-hyphenate-limit-zone: 8%; 38 -ms-hyphens: auto; 39 -ms-hyphenate-limit-chars: 6 3 3; 40 -ms-hyphenate-limit-lines: 2; 41 -ms-hyphenate-limit-last: always; 42 -ms-hyphenate-limit-zone: 8%; 43 hyphens: auto; 44 hyphenate-limit-chars: 6 3 3; 45 hyphenate-limit-lines: 2; 46 hyphenate-limit-last: always; 47 hyphenate-limit-zone: 8%; 48 } 49 50 span.text[lang="la"] { 51 -webkit-hyphenate-limit-before: 3; 52 -webkit-hyphenate-limit-after: 3; 53 -webkit-hyphenate-limit-chars: 6 3 3; 54 -webkit-hyphenate-limit-lines: 2; 55 -webkit-hyphenate-limit-last: always; 56 -webkit-hyphenate-limit-zone: 8%; 57 -moz-hyphens: auto; 58 -moz-hyphenate-limit-chars: 6 3 3; 59 -moz-hyphenate-limit-lines: 2; 60 -moz-hyphenate-limit-last: always; 61 -moz-hyphenate-limit-zone: 8%; 62 -ms-hyphens: auto; 63 -ms-hyphenate-limit-chars: 6 3 3; 64 -ms-hyphenate-limit-lines: 2; 65 -ms-hyphenate-limit-last: always; 66 -ms-hyphenate-limit-zone: 8%; 67 hyphens: auto; 68 hyphenate-limit-chars: 6 3 3; 69 hyphenate-limit-lines: 2; 70 hyphenate-limit-last: always; 71 hyphenate-limit-zone: 8%; 72 } 73 74 .refFocused { 75 background-color: var(--sc-primary-color-light-transparent) !important; 76 padding-top: 8px; 77 } 78 79 .sutta-title { 80 word-break: break-word; 81 } 82 83 #segmented_text_content { 84 min-height: 70vh; 85 } 86`,n=i.qy` 87 <style> 88 section, 89 article { 90 max-width: 720px; 91 } 92 93 .root { 94 display: none; 95 } 96 97 .verse-line { 98 display: block; 99 } 100 101 .verse-line .translation { 102 hyphens: none; 103 margin-left: 2em; 104 } 105 /* remove the margin when the text is empty (e.g. omitted repetition), so that there isn't a block of empty space when only viewing the translation */ 106 .verse-line .translation:has(> .text:empty) { 107 margin-left: 0; 108 } 109 110 j { 111 display: block; 112 margin-left: 2em; 113 } 114 115 /* Set styles for tooltip marker. First we hide the actual content. These settings ensure the beginning, i.e. the :before content, is visible and the rest is hidden. Height is important to maintain even line-height. */ 116 .comment, 117 .variant { 118 overflow: hidden; 119 120 width: 1ex; 121 height: 1em; 122 padding: 0 0 0 0; 123 margin-left: -4px; 124 125 white-space: nowrap; 126 127 border: none; 128 background-color: inherit; 129 } 130 </style> 131`,r=i.qy` 132 <style> 133 section, 134 article { 135 max-width: 720px; 136 word-wrap: break-word; 137 overflow-wrap: break-word; 138 hyphens: auto; 139 -webkit-hyphens: auto; 140 -ms-hyphens: auto; 141 word-break: break-word; 142 } 143 144 .verse-line .root { 145 display: block; 146 hyphens: none; 147 margin-left: 4em; 148 } 149 150 .verse-line .text { 151 margin-left: -2em; 152 } 153 154 wbr { 155 display: block; 156 } 157 158 .comment, 159 .variant { 160 overflow: hidden; 161 162 width: 1ex; 163 height: 1em; 164 padding: 0 6px 0 0; 165 166 white-space: nowrap; 167 168 border: none; 169 background-color: inherit; 170 } 171 </style> 172`,o=i.qy` 173 <style> 174 .root { 175 display: none; 176 } 177 178 /* Let min width be handled by media queries, max width according to the nested grid width.*/ 179 .segment { 180 display: grid; 181 182 grid-template-columns: 60px 1fr; 183 grid-column-gap: var(--sc-size-lg); 184 } 185 /* don't display when the text is empty (e.g. omitted repetition), so that there isn't a block of empty space when only viewing the translation */ 186 .segment:has(.translation > .text:empty) { 187 display: none; 188 } 189 190 .reference { 191 grid-column: 1; 192 grid-row: 1 / span 3; 193 194 border: none; 195 196 background-color: inherit; 197 } 198 199 .translation { 200 grid-column: 2; 201 } 202 203 .translation { 204 display: grid; 205 206 grid-template-columns: minmax(240px, 720px) minmax(120px, 480px); 207 grid-column-gap: var(--sc-size-lg); 208 } 209 210 .text { 211 grid-column: 1; 212 } 213 214 .comment {
215 margin-bottom: var(--sc-size-sm); 216 217 height: fit-content; 218 219 grid-column: 2; 220 grid-row: 1; 221 } 222 223 .verse-line .translation, 224 .verse-line .root { 225 text-indent: 2em; 226 } 227 228 @media only screen and (max-width: 600px) { 229 .segment, 230 .reference, 231 .translation { 232 display: block; 233 } 234 235 .variant, 236 .comment { 237 display: table; 238 239 margin-top: var(--sc-size-sm); 240 } 241 } 242 </style> 243`,l=i.qy` 244 <style> 245 .segment { 246 display: grid; 247 grid-template-columns: 60px 1fr; 248 grid-column-gap: var(--sc-size-lg); 249 } 250 251 .reference { 252 grid-column: 1; 253 grid-row: 1 / span 3; 254 border: none; 255 background-color: inherit; 256 } 257 258 .root { 259 grid-column: 2; 260 } 261 262 .root { 263 display: grid; 264 grid-template-columns: minmax(240px, 720px) minmax(120px, 480px); 265 grid-column-gap: var(--sc-size-lg); 266 } 267 268 .text { 269 grid-column: 1; 270 } 271 272 .variant { 273 grid-column: 2; 274 grid-row: 1; 275 } 276 277 br { 278 content: ''; 279 } 280 281 @media only screen and (max-width: 600px) { 282 .segment, 283 .reference, 284 .root { 285 display: block; 286 } 287 288 .variant, 289 .comment {
290 display: table; 291 margin-top: var(--sc-size-sm); 292 } 293 } 294 </style> 295`,c=i.qy` 296 <style> 297 .segment { 298 display: grid; 299 300 grid-template-columns: minmax(240px, 720px) minmax(240px, 720px); 301 grid-column-gap: var(--sc-size-lg); 302 user-select: none; 303 } 304 305 .verse-line .translation, 306 .verse-line .root { 307 text-indent: 2em; 308 } 309 310 .translation { 311 grid-column: 1; 312 user-select: text; 313 } 314 315 .root { 316 grid-column: 2; 317 user-select: text; 318 } 319 320 .root .text { 321 font-family: var(--sc-sans-font); 322 } 323 324 br { 325 content: ''; 326 } 327 328 /* Center the tooltip in the respective column */ 329 .translation, 330 .root { 331 position: relative; 332 } 333 334 .reference { 335 justify-self: baseline; 336 } 337 338 /* Set styles for tooltip marker. First we hide the actual content of the .comment tag. These settings ensure the beginning of .comment, i.e. the :before content, is visible and the rest is hidden. Height is important to maintain even line-height. */ 339 .comment, 340 .variant { 341 overflow: hidden; 342 343 width: 1ex; 344 height: 1em; 345 padding: 0 6px 0 0; 346 347 white-space: nowrap; 348 349 border: none; 350 background-color: inherit; 351 } 352 353 @media only screen and (max-width: 600px) { 354 .segment, 355 .translation, 356 .root { 357 position: relative; 358 359 display: block; 360 } 361 362 .root .text { 363 color: var(--sc-on-primary-secondary-text-color); 364 } 365 } 366 </style> 367`,h=i.qy` 368 <style> 369 .segment { 370 display: grid; 371 372 grid-template-columns: 60px 1fr 1fr; 373 grid-column-gap: var(--sc-size-lg); 374 } 375 376 .verse-line .translation, 377 .verse-line .root { 378 text-indent: 2em; 379 } 380 381 .reference { 382 grid-column: 1; 383 grid-row: 1 / span 3; 384 385 justify-self: baseline; 386 } 387 388 .translation { 389 grid-column: 2; 390 } 391 392 .root { 393 grid-column: 3; 394 } 395 396 .root .text { 397 font-family: var(--sc-sans-font); 398 } 399 400 .translation, 401 .root { 402 display: grid; 403 404 grid-template-columns: minmax(240px, 720px) minmax(120px, 300px); 405 grid-column-gap: var(--sc-size-lg); 406 } 407 408 .text { 409 grid-column: 1; 410 } 411 412 .comment, 413 .variant { 414 grid-column: 2; 415 grid-row: 1; 416 417 height: fit-content; 418 419 margin-bottom: var(--sc-size-sm); 420 } 421 422 br { 423 content: ''; 424 } 425 426 blockquote { 427 margin: 0; 428 } 429 430 @media only screen and (max-width: 1280px) { 431 .translation, 432 .root, 433 .variant, 434 .comment {
435 display: table; 436 437 margin-top: var(--sc-size-sm); 438 } 439 440 .segment { 441 grid-template-columns: minmax(240px, 720px) minmax(240px, 720px); 442 } 443 444 .reference { 445 grid-column: 1 / span 2; 446 } 447 448 .translation { 449 grid-column: 1; 450 } 451 452 .root { 453 grid-column: 2; 454 } 455 } 456 457 @media only screen and (max-width: 600px) { 458 .segment, 459 .reference, 460 .translation, 461 .root { 462 display: block; 463 } 464 465 .variant, 466 .comment { 467 display: table; 468 469 margin-top: var(--sc-size-sm); 470 } 471 472 .root .text { 473 color: var(--sc-on-primary-secondary-text-color); 474 } 475 } 476 </style> 477`,d=i.qy` 478 <style> 479 .segment { 480 display: grid; 481 482 grid-template-columns: minmax(200px, 720px); 483 } 484 485 .verse-line .translation, 486 .verse-line .root { 487 text-indent: 2em; 488 } 489 490 .reference { 491 display: none; 492 493 justify-self: baseline; 494 } 495 496 .translation { 497 grid-column: 1; 498 } 499 500 .root { 501 grid-column: 1; 502 } 503 504 .root .text { 505 color: var(--sc-on-primary-secondary-text-color); 506 font-family: var(--sc-sans-font); 507 } 508 509 br { 510 content: ''; 511 } 512 513 .comment, 514 .variant { 515 overflow: hidden; 516 517 width: 1ex; 518 height: 1em; 519 padding: 0 6px 0 0; 520 521 white-space: nowrap; 522 523 border: none; 524 background-color: inherit; 525 } 526 </style> 527`,p=i.qy` 528 <style> 529 .segment { 530 display: grid; 531 532 grid-template-columns: 60px 1fr; 533 grid-column-gap: var(--sc-size-lg); 534 } 535 536 .reference { 537 grid-column: 1; 538 grid-row: 1 / span 3; 539 540 justify-self: baseline; 541 } 542 543 .translation { 544 grid-column: 2; 545 } 546 547 .root { 548 grid-column: 2; 549 } 550 551 .root .text { 552 color: var(--sc-on-primary-secondary-text-color); 553 font-family: var(--sc-sans-font); 554 } 555 556 .translation, 557 .root { 558 display: grid; 559 560 grid-template-columns: minmax(240px, 720px) minmax(120px, 480px); 561 grid-column-gap: var(--sc-size-lg); 562 } 563 564 .text { 565 grid-column: 1; 566 } 567 568 .comment, 569 .variant { 570 padding: var(--sc-size-sm) var(--sc-size-md); 571 572 grid-column: 2; 573 grid-row: 1; 574 } 575 576 br { 577 content: ''; 578 } 579 580 blockquote { 581 margin: 0; 582 } 583 584 blockquote .text { 585 margin-left: 2vw; 586 } 587 588 @media only screen and (max-width: 840px) { 589 .segment, 590 .reference, 591 .translation, 592 .root { 593 display: block; 594 } 595 596 .variant, 597 .comment {
598 display: table; 599 600 margin-top: var(--sc-size-sm); 601 } 602 } 603 </style> 604`,u=i.qy` 605 <style> 606 .reference { 607 display: none; 608 } 609 </style> 610`,g=i.qy` 611 <style> 612 .comment, 613 .variant { 614 display: none; 615 } 616 617 .comment:before, 618 .variant:before { 619 content: none; 620 } 621 </style> 622`,m=i.qy` 623 <style> 624 .comment::before, 625 .variant::before { 626 line-height: 1; 627 628 content: '* '; 629 vertical-align: super; 630 631 font-weight: 800; 632 } 633 634 .comment::before { 635 color: var(--sc-primary-accent-color-light); 636 } 637 638 .variant::before { 639 color: var(--sc-secondary-accent-color-light); 640 } 641 </style> 642`,f=i.qy` 643 <style> 644 .translation { 645 user-select: text !important; 646 } 647 648 .root { 649 user-select: none !important; 650 } 651 </style> 652`,y=i.qy` 653 <style> 654 .translation { 655 user-select: none ; 656 } 657 658 .root { 659 user-select: text; 660 } 661 </style> 662`,S=i.qy` 663 <style> 664 .root { 665 order: 1; 666 } 667 668 .translation { 669 order: 2; 670 } 671 672 .root .text { 673 color: var(--sc-on-primary-primary-text-color); 674 } 675 676 .translation .text { 677 color: var(--sc-on-primary-secondary-text-color); 678 font-family: var(--sc-sans-font); 679 } 680 </style> 681`,x=i.qy` 682 <style> 683 /* Hide the actual content of the comment and variant, but keep the elements interactive */ 684 .comment, 685 .variant { 686 position: relative; 687 display: inline; 688 cursor: help; 689 690 font-size: 0; 691 line-height: 0; 692 overflow: hidden; 693 white-space: nowrap; 694 695 /* Ensure the element can still receive mouse events */ 696 min-width: 1em; 697 min-height: 1em; 698 } 699 700 /* Floating UI tooltip styles */ 701 .floating-tooltip { 702 font-family: var(--sc-sans-font); 703 font-size: var(--sc-font-size-s); 704 font-weight: 400; 705 font-style: normal; 706 line-height: 1.3333; 707 708 max-width: 320px; 709 padding: 12px 16px; 710 711 color: var(--sc-on-primary-primary-text-color); 712 background-color: var(--sc-secondary-background-color); 713 border: 1px solid var(--sc-border-color); 714 border-radius: 8px; 715 box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15); 716 717 word-wrap: break-word; 718 word-break: break-word; 719 720 cursor: default; 721 user-select: text; 722 723 z-index: 10; 724 725 display: inline-block; 726 727 box-sizing: border-box; 728 padding: var(--sc-size-sm) var(--sc-size-md); 729 730 text-align: left; 731 text-indent: 0; 732 text-transform: none; 733 letter-spacing: normal; 734 735 color: var(--sc-on-tertiary-secondary-text-color); 736 border-radius: var(--sc-mid-border-radius); 737 background-color: var(--sc-tertiary-background-color); 738 739 font-variant-caps: normal; 740 } 741 742 .floating-tooltip a { 743 color: var(--sc-primary-color); 744 text-decoration: underline; 745 } 746 747 .floating-tooltip a:hover { 748 color: var(--sc-primary-color-dark); 749 } 750 751 .comment::before, 752 .variant::before { 753 font-size: var(--sc-font-size-md); 754 line-height: 1; 755 font-weight: 800; 756 vertical-align: super; 757 content: '* '; 758 } 759 760 .comment::before { 761 color: var(--sc-primary-accent-color-light); 762 } 763 764 .variant::before { 765 color: var(--sc-secondary-accent-color-light); 766 } 767 768 .floating-tooltip:hover::after { 769 opacity: 0.8; 770 } 771 772 .floating-tooltip.mobile-tooltip { 773 max-width: 90vw; 774 font-size: 16px; 775 padding: 16px 20px; 776 box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25); 777 border-radius: 12px; 778 } 779 780 @media (pointer: coarse) { 781 .comment::before, 782 .variant::before { 783 padding: 4px; 784 margin: 0 2px; 785 } 786 } 787 788 @media screen and (max-width: 768px) { 789 .floating-tooltip { 790 -webkit-text-size-adjust: none; 791 text-size-adjust: none; 792 } 793 } 794 </style> 795`},5325:function(t,e,a){a.d(e,{D:function(){return i}});const i=a(6337).AH` 796 section, 797 article { 798 max-width: 720px; 799 } 800 801 .image-link { 802 cursor: pointer; 803 } 804 805 .image-book-link { 806 margin-bottom: 0.5em; 807 margin-left: 0.2em; 808 } 809 810 .image-book-link:before { 811 display: none; 812 } 813 814 .text-center { 815 text-align: center; 816 } 817 818 .margin-top-xl { 819 margin-top: var(--sc-size-xl); 820 } 821 822 article p, 823 .word, 824 .translated-text, 825 .original-text { 826 transition: background-color 300ms ease-in; 827 } 828 829 p, 830 li { 831 hanging-punctuation: first last; 832 } 833 834 @media (max-width: 428px) { 835 section, 836 article { 837 max-width: 320px; 838 } 839 } 840`},5523:function(t,e,a){var i=a(6337),s=a(3931),n=a(9911),r=a(6781);class o extends((0,n.J)(i.WF)){static properties={next:{type:Object},previous:{type:Object},lang:{type:String}};constructor(){super(),this.localizedStringsPath="/localization/elements/interface"}static styles=i.AH` 841 @media print { 842 :host { 843 display: none; 844 } 845 } 846 847 .bar { 848 display: flex; 849 overflow: hidden; 850 851 margin: 0 2%; 852 padding: 0; 853 854 border-radius: 48px; 855 856 gap: 4%; 857 justify-content: space-around; 858 } 859 860 @media only screen and (max-width: 600px) { 861 .bar { 862 flex-direction: column; 863 ; 864 865 height: 13rem; 866 } 867 } 868 869 a { 870 text-decoration: none; 871 } 872 873 .button { 874 display: flex; 875 876 width: 100%; 877 min-width: 10rem; 878 height: 6rem; 879 880 border-radius: 48px; 881 background-color: var(--sc-tertiary-background-color); 882 } 883 884 .button:hover { 885 transition: var(--sc-link-transition); 886 text-decoration: none; 887 888 background-color: var(--sc-primary-color-light-transparent); 889 } 890 891 button:active { 892 background-color: var(--sc-primary-color-light); 893 } 894 895 .button-right { 896 justify-content: flex-end; 897 } 898 899 .button-left, .button-right { 900 position: relative; 901 } 902 903 .button-right .text-title { 904 padding-left: 1em; 905 } 906 907 .button-left .text-title { 908 padding-right: 1em; 909 } 910 911 .action { 912 font-family: var(--sc-sans-font); 913 font-size: var(--sc-font-size-s); 914 font-stretch: expanded; 915 916 opacity: .55; 917 color: var(--sc-on-primary-primary-text-color); 918 919 font-variant-caps: all-small-caps; 920 } 921 922 .text-title { 923 font-family: var(--sc-sans-font); 924 font-size: var(--sc-font-size-l); 925 font-stretch: condensed; 926 927 overflow: hidden; 928 929 white-space: nowrap; 930 text-overflow: ellipsis; 931 932 color: var(--sc-on-tertiary-primary-text-color); 933 } 934 935 .link .text-title { 936 box-sizing: border-box; 937 938 transition: var(--sc-link-transition); 939 } 940 941 .text { 942 display: flex; 943 944 margin: auto 0; 945 } 946 947 .text-element { 948 display: inline-grid; 949 950 text-overflow: ellipsis; 951 } 952 953 .text-element-right { 954 text-align: end; 955 } 956 957 .icon { 958 font-size: var(--sc-font-size-l); 959 960 width: var(--sc-size-md-larger); 961 min-width: var(--sc-size-md-larger); 962 margin-top: 1em; 963 margin-right: .5em; 964 margin-left: .5em; 965 966 fill: var(--sc-icon-color); 967 } 968 969 @media (min-width: 1280px) { 970 .arrow_right { 971 margin-left: 1em; 972 } 973 974 .arrow_left { 975 margin-right: 1em; 976 } 977 } 978 `;render(){return i.qy` 979 <div class="bar"> 980 <div class="button-container"> 981 ${this.previous?.uid?i.qy` 982 <a href=${this._getUrl(this.previous)}> 983 <div class="button button-left"> 984 <div class="text"> 985 ${s.K.arrow_left} 986 <div class="text-element">
987 <span class="action">${(0,r._)(this.localize("interface:previous"))}</span> 988 <span class="text-title">${this.previous.name}</span> 989 </div> 990 </div> 991 <md-ripple></md-ripple> 992 </div> 993 </a> 994 `:""} 995 </div> 996 997 <div class="button-container"> 998 ${this.next?.uid?i.qy` 999 <a href=${this._getUrl(this.next)}> 1000 <div class="button button-right"> 1001 <div class="text"> 1002 <div class="text-element text-element-right"> 1003 <span class="action">${(0,r._)(this.localize("interface:next"))}</span> 1004 <span class="text-title">${this.next.name}</span> 1005 </div> 1006 ${s.K.arrow_right} 1007 </div> 1008 <md-ripple></md-ripple> 1009 </div> 1010 </a> 1011 `:""} 1012 </div> 1013 </div> 1014 `}_getUrl(t){const{author_uid:e,uid:a,lang:i}=t;return`/${a}/${i}/${e}`}}customElements.define("sc-text-stepper",o)},6655:function(t,e,a){a.d(e,{B:function(){return i}});const i=a(6337).AH` 1015 /* includes all text styles found in one or more of static, legacy, or bilara */ 1016 :host { 1017 font-family: var(--sc-serif-font); 1018 font-weight: 400; 1019 line-height: 1.5; 1020 1021 color: var(--sc-on-primary-primary-text-color); 1022 } 1023 1024 main { 1025 display: flex; 1026 1027 justify-content: center; 1028 } 1029 1030 main > article, 1031 div > article, 1032 .range { 1033 margin: 0 1em; 1034 } 1035 1036 /* text block elements */ 1037 1038 ul, 1039 ol, 1040 dt, 1041 p, 1042 figure, 1043 pre { 1044 margin: 0.75em 0 0 0; 1045 } 1046 1047 li::marker { 1048 font-family: var(--sc-sans-font); 1049 font-weight: 600; 1050 1051 color: var(--sc-icon-color); 1052 1053 font-feature-settings: 'tnum', 'onum'; 1054 } 1055 1056 hr { 1057 width: 33%; 1058 height: 0; 1059 margin: 1.5em auto; 1060 1061 border: 0; 1062 border-bottom: 1px solid var(--sc-on-primary-secondary-text-color); 1063 } 1064 1065 /* headings */ 1066 1067 h1, 1068 h2, 1069 h3, 1070 h4, 1071 h5, 1072 h6 { 1073 line-height: 1.25; 1074 1075 margin: 1em 0 0 0; 1076 1077 color: var(--sc-on-primary-secondary-text-color); 1078 } 1079 1080 h1 { 1081 font-size: var(--sc-font-size-xxxxl); 1082 font-weight: 400; 1083 text-wrap: balance; 1084 } 1085 1086 h2 { 1087 font-size: var(--sc-font-size-xxxl); 1088 font-weight: 400; 1089 } 1090 1091 h3 { 1092 font-size: var(--sc-font-size-xxl); 1093 font-weight: 400; 1094 } 1095 1096 h4 { 1097 font-size: var(--sc-font-size-xl); 1098 font-weight: 400; 1099 } 1100 1101 h5 { 1102 font-size: var(--sc-font-size-l); 1103 font-weight: 600; 1104 } 1105 1106 h6 { 1107 font-size: var(--sc-font-size-md); 1108 font-style: italic; 1109 } 1110 1111 /*sutta title */ 1112 1113 header { 1114 margin-bottom: 4rem; 1115 1116 text-align: center; 1117 1118 color: var(--sc-on-primary-secondary-text-color); 1119 } 1120 1121 header ul { 1122 font-weight: 500; 1123 1124 display: block; 1125 1126 margin: 0; 1127 padding: 0; 1128 1129 list-style-type: none; 1130 1131 letter-spacing: var(--sc-caps-letter-spacing); 1132 1133 font-variant-caps: all-small-caps; 1134 } 1135 1136 header h1 { 1137 margin-top: 0.5rem; 1138 1139 letter-spacing: var(--sc-caps-letter-spacing); 1140 1141 font-variant-caps: small-caps; 1142 } 1143 1144 /* table of contents */ 1145 1146 .contents { 1147 margin: 4em 0; 1148 1149 border-left: 4px solid var(--sc-primary-color-light); 1150 border-radius: 4px; 1151 } 1152 1153 .contents ul { 1154 list-style-type: none; 1155 } 1156 1157 .contents ol { 1158 margin: 0 0 0 2rem; 1159 padding: 0 0 0 1rem; 1160 } 1161 1162 .contents li { 1163 font-family: var(--sc-serif-font); 1164 font-size: var(--sc-font-size-md); 1165 font-weight: 400; 1166 1167 margin: 0.5em 0; 1168 } 1169 1170 .contents a { 1171 padding: 8px 16px 6px; 1172 1173 text-decoration: none; 1174 1175 color: inherit; 1176 border-radius: 18px; 1177 transition: var(--sc-link-transition); 1178 background-color: inherit; 1179 } 1180 1181 .contents a:hover { 1182 transition: var(--sc-link-transition); 1183 text-decoration: none; 1184 1185 background-color: var(--sc-primary-color-light-transparent); 1186 } 1187 1188 .contents a:active { 1189 background-color: var(--sc-primary-color-light); 1190 } 1191 1192 /* tables */ 1193 1194 table { 1195 margin: 2em auto 1em; 1196 1197 border-collapse: collapse; 1198 } 1199 1200 caption { 1201 font-weight: 600; 1202 1203 padding: 1em; 1204 } 1205 1206 td { 1207 padding: 0.6667em; 1208 1209 vertical-align: text-top; 1210 1211 border-top: var(--sc-border); 1212 border-bottom: var(--sc-border); 1213 } 1214 1215 td:first-child { 1216 font-weight: bold; 1217 } 1218 1219 /* lists */ 1220 1221 ol, 1222 ul { 1223 padding-left: 1em; 1224 } 1225 1226 ol ul, 1227 ul ol, 1228 ul ul, 1229 ol ol { 1230 margin: 0.5em 0 0; 1231 } 1232 1233 li { 1234 padding: 0; 1235 } 1236 1237 dt { 1238 font-weight: bold; 1239 } 1240 1241 dd { 1242 margin-left: 1em; 1243 } 1244 1245 dd ol, 1246 dd ul { 1247 padding-left: 0; 1248 } 1249 1250 /* links */ 1251 1252 h1 a, 1253 h2 a, 1254 h3 a, 1255 h4 a, 1256 h5 a, 1257 h6 a { 1258 text-decoration: none; 1259 } 1260 1261 /* static endnotes */ 1262 1263 @supports (font-variant-position: super) { 1264 a[role='doc-noteref'] { 1265 font-family: var(--sc-sans-font); 1266 font-weight: 600 !important; 1267 font-style: normal !important; 1268 line-height: 1; 1269 1270 display: inline-block; 1271 1272 height: 0.55em; 1273 margin-top: -0.15em; 1274 padding: 0.1em 0.2em; 1275 1276 text-decoration: none; 1277 1278 color: var(--sc-on-primary-secondary-text-color); 1279 border: 0.15em solid var(--sc-primary-color-light); 1280 border-radius: 50%; 1281 1282 font-variant-position: super; 1283 } 1284 } 1285 1286 @supports not (font-variant-position: super) { 1287 a[role='doc-noteref'] { 1288 font-family: var(--sc-sans-font); 1289 font-size: var(--sc-font-size-xs); 1290 font-weight: 600 !important; 1291 font-style: normal !important; 1292 line-height: 1; 1293 1294 padding: 0 0.2em; 1295 1296 vertical-align: super; 1297 text-decoration: none; 1298 1299 color: var(--sc-on-primary-secondary-text-color); 1300 border: 0.15em solid var(--sc-primary-color-light); 1301 border-radius: 50%; 1302 } 1303 } 1304 1305 a[role='doc-backlink'] { 1306 font-family: var(--sc-sans-font); 1307 font-size: 0; 1308 1309 padding: 0 0.2em; 1310 1311 text-decoration: none; 1312 1313 color: var(--sc-on-primary-secondary-text-color); 1314 } 1315 1316 /* use this pseudoelement together with the size 0 font hack because Skolar does not have the backlink character, but it does have a bunch of arrows in the PUA, so use one of them instead */ 1317 1318 a[role='doc-backlink']::after { 1319 font-size: var(--sc-font-size-l); 1320 1321 content: 'ó°'; 1322 } 1323 1324 a[role='doc-noteref']:hover, 1325 a[role='doc-backlink']::hover { 1326 text-decoration: none 1327 } 1328 1329 section[role='doc-endnotes'] { 1330 position: relative; 1331 1332 margin-top: 3em; 1333 padding-top: 1em; 1334 } 1335 1336 section[role='doc-endnotes']::before { 1337 position: absolute; 1338 top: 0; 1339 left: 0; 1340 1341 width: 50%; 1342 height: 1px; 1343 1344 content: ' '; 1345 1346 border-top: 1px solid var(--sc-icon-color); 1347 } 1348 1349 /* descriptive classes used in bilara and legacy texts */ 1350 1351 .evam { 1352 letter-spacing: var(--sc-caps-letter-spacing); 1353 1354 font-variant-caps: all-small-caps; 1355 } 1356 1357 .namo { 1358 font-style: italic; 1359 1360 text-align: center; 1361 } 1362 1363 .roman-numerals { 1364 text-decoration: underline overline; 1365 letter-spacing: var(--sc-caps-letter-spacing); 1366 text-transform: uppercase; 1367 1368 text-decoration-thickness: 0.05em; 1369 text-underline-offset: 0.2em; 1370 } 1371 1372 .speaker { 1373 font-style: italic; 1374 1375 display: block; 1376 1377 text-indent: 3em; 1378 } 1379 1380 .pe { 1381 font-style: italic; 1382 1383 color: var(--sc-on-primary-secondary-text-color); 1384 } 1385 1386 .expansion-instructions { 1387 font-style: italic; 1388 1389 color: var(--sc-on-primary-secondary-text-color); 1390 } 1391 1392 .add { 1393 color: var(--sc-on-primary-secondary-text-color); 1394 } 1395 1396 /* end of section */ 1397 1398 .endsection, 1399 .end, 1400 .endsubsection { 1401 font-style: italic; 1402 1403 text-align: center; 1404 1405 color: var(--sc-on-primary-secondary-text-color); 1406 } 1407 1408 .endsutta { 1409 font-weight: bold; 1410 1411 text-align: center; 1412 1413 color: var(--sc-on-primary-secondary-text-color); 1414 } 1415 1416 .endbook, 1417 .endvagga, 1418 .endkanda { 1419 text-align: center; 1420 letter-spacing: var(--sc-caps-letter-spacing); 1421 text-transform: uppercase; 1422 1423 color: var(--sc-on-primary-secondary-text-color); 1424 } 1425 1426 [lang='si'] .endbook, 1427 [lang='zh'] .endbook, 1428 [lang='si'] .endvagga { 1429 letter-spacing: normal; 1430 text-transform: none; 1431 1432 font-variant-caps: normal; 1433 } 1434 1435 .endbook { 1436 font-weight: bold; 1437 } 1438 1439 /* uddana */ 1440 1441 .uddana { 1442 font-family: var(--sc-sans-font); 1443 font-size: var(--sc-font-size-s); 1444 font-weight: 400; 1445 1446 color: var(--sc-on-primary-secondary-text-color); 1447 } 1448 1449 .uddana-intro { 1450 font-weight: bold; 1451 1452 color: var(--sc-on-primary-secondary-text-color); 1453 } 1454 1455 .uddanagatha { 1456 font-family: var(--sc-sans-font); 1457 font-size: var(--sc-font-size-s); 1458 font-weight: 400; 1459 font-style: inherit; 1460 1461 color: var(--sc-on-primary-secondary-text-color); 1462 } 1463 1464 /* descriptive classes for metadata*/ 1465 1466 .author { 1467 letter-spacing: var(--sc-caps-letter-spacing); 1468 1469 font-variant-caps: small-caps; 1470 } 1471 1472 .ref { 1473 font-family: var(--sc-sans-font); 1474 font-weight: 600; 1475 font-style: normal; 1476 1477 white-space: nowrap; 1478 letter-spacing: normal; 1479 1480 color: var(--sc-on-primary-secondary-text-color); 1481 1482 font-variant-caps: normal; 1483 } 1484 1485 footer { 1486 display: none; 1487 } 1488 1489 /* style highlighted text, see zz3/zz/test and zz1/zz/test*/ 1490 1491 /* Vinaya classes */ 1492 1493 .kamma { 1494 font-weight: 600; 1495 } 1496 1497 .highlight .kamma { 1498 position: relative; 1499 1500 margin: 0 -0.25em; 1501 padding: 0 0.25em; 1502 1503 outline: 2px solid var(--sc-secondary-accent-color); 1504 } 1505 1506 .rule { 1507 font-weight: 800; 1508 } 1509 1510 .subrule { 1511 font-weight: 600; 1512 } 1513 1514 .highlight .cakka { 1515 color: var(--sc-secondary-accent-color); 1516 } 1517 1518 .highlight .anapatti { 1519 font-weight: 500; 1520 } 1521 1522 .highlight .nidana { 1523 color: var(--sc-primary-accent-color); 1524 } 1525 1526 .highlight .patimokkha p { 1527 position: relative; 1528 1529 margin: 0 -0.25em; 1530 padding: 0 0.25em; 1531 1532 outline: 2px solid var(--sc-toast-error-color); 1533 } 1534 1535 .highlight :not(.patimokkha) .rule { 1536 position: relative; 1537 1538 margin: 0 -0.25em; 1539 padding: 0 0.25em; 1540 1541 outline: 2px dotted var(--sc-toast-error-color); 1542 } 1543 1544 .highlight .suttanta { 1545 position: relative; 1546 1547 margin: 0 -0.25em; 1548 padding: 0 0.25em; 1549 1550 outline: 2px solid var(--sc-primary-color-light); 1551 } 1552 1553 .highlight .jataka { 1554 position: relative; 1555 1556 margin: 0 -0.25em; 1557 padding: 0 0.25em; 1558 1559 outline: 2px solid var(--sc-primary-accent-color-light); 1560 } 1561 1562 .highlight .patimokkha p::before, 1563 .highlight :not(.patimokkha) .rule::before, 1564 .highlight .kamma::before, 1565 .highlight .suttanta::before, 1566 .highlight .jataka::before { 1567 font-family: var(--sc-sans-font); 1568 font-size: var(--sc-font-size-s); 1569 font-weight: 400; 1570 font-style: normal; 1571 line-height: 1.3333; 1572 1573 position: absolute; 1574 z-index: 10; 1575 top: -36px; 1576 left: 0; 1577 1578 display: inline-block; 1579 visibility: hidden; 1580 1581 box-sizing: border-box; 1582 height: 36px; 1583 padding: var(--sc-size-sm) var(--sc-size-md); 1584 padding: var(--sc-size-sm) var(--sc-size-md); 1585 1586 text-align: left; 1587 white-space: normal; 1588 letter-spacing: normal; 1589 1590 color: var(--sc-on-primary-secondary-text-color); 1591 color: var(--sc-on-primary-secondary-text-color); 1592 border-width: 0 0 0 8px; 1593 border-style: solid; 1594 border-color: var(--sc-primary-color); 1595 border-radius: var(--sc-size-sm); 1596 background-color: var(--sc-secondary-background-color); 1597 box-shadow: var(--sc-shadow-elevation-8dp); 1598 1599 font-variant-caps: normal; 1600 } 1601 1602 .highlight .patimokkha p::before { 1603 content: 'This text is included in the patimokkha recitation'; 1604 } 1605 1606 .highlight :not(.patimokkha) .rule::before { 1607 content: 'This rule is not included in the patimokkha recitation'; 1608 } 1609 1610 .highlight .kamma::before { 1611 content: 'This text is a formal legal statement of the Sangha'; 1612 } 1613 1614 .highlight .suttanta::before { 1615 content: 'This text is found also in the Discourses (Sutta)'; 1616 } 1617 1618 .highlight .jataka::before { 1619 content: 'This text is a story of the Buddhaâs past lives (JÄtaka)'; 1620 } 1621 1622 .highlight :hover::before, 1623 .highlight .patimokkha p:hover::before, 1624 .highlight :not(.patimokkha) .rule:hover::before { 1625 visibility: visible; 1626 } 1627 1628 .highlight .padabhajaniya { 1629 margin: 0 -0.25em; 1630 padding: 0 0.25em; 1631 1632 background-color: var(--sc-tertiary-background-color); 1633 } 1634 1635 .highlight .vinaya-vinita { 1636 color: var(--sc-primary-accent-color); 1637 } 1638 1639 .help-heading, 1640 .inserted-heading { 1641 font-style: italic; 1642 } 1643 1644 /* descriptive classes */ 1645 1646 .xu { 1647 font-size: var(--sc-dense-font-size-s); 1648 1649 margin-bottom: 4rem; 1650 padding: 1rem; 1651 1652 color: var(--sc-on-primary-secondary-text-color); 1653 border: var(--sc-border); 1654 border-radius: var(--sc-size-s); 1655 background-color: var(--sc-tertiary-background-color); 1656 } 1657 1658 .suttainfo { 1659 display: inline-block; 1660 1661 margin-bottom: 2rem; 1662 padding: 1rem; 1663 1664 color: var(--sc-on-primary-secondary-text-color); 1665 border: var(--sc-border); 1666 border-radius: var(--sc-size-s); 1667 background-color: var(--sc-tertiary-background-color); 1668 } 1669 1670 .suppliedmetre { 1671 color: var(--sc-on-primary-secondary-text-color); 1672 } 1673 1674 .gap { 1675 color: var(--sc-on-primary-secondary-text-color); 1676 } 1677 1678 .describe { 1679 text-decoration: line-through; 1680 1681 text-decoration-color: var(--sc-on-primary-secondary-text-color); 1682 } 1683 1684 .del {
1685 text-decoration: line-through; 1686 1687 text-decoration-color: var(--sc-on-primary-secondary-text-color); 1688 } 1689 1690 .scribe { 1691 font-style: italic; 1692 } 1693 1694 .alt-title { 1695 display: none; 1696 } 1697 1698 .hidden { 1699 display: none; 1700 } 1701 1702 .metre { 1703 display: none; 1704 } 1705 1706 .t-gaiji { 1707 color: var(--sc-primary-accent-color); 1708 } 1709 1710 .rule-number { 1711 color: var(--sc-on-primary-secondary-text-color); 1712 } 1713 1714 .allowance { 1715 font-weight: bold; 1716 } 1717 1718 .t-note { 1719 color: var(--sc-on-primary-secondary-text-color); 1720 } 1721 1722 .vagga-number { 1723 color: var(--sc-on-primary-secondary-text-color); 1724 } 1725 1726 .counter { 1727 font-family: var(--sc-sans-font); 1728 font-size: var(--sc-dense-font-size-s); 1729 font-weight: 400; 1730 1731 color: var(--sc-on-primary-secondary-text-color); 1732 } 1733 1734 .term { 1735 font-weight: bold; 1736 } 1737 1738 .highlight .orthodox::before { 1739 content: 'â'; 1740 1741 color: var(--sc-toast-success-color); 1742 } 1743 1744 .highlight .heterodox::before { 1745 content: 'â '; 1746 1747 color: var(--sc-toast-error-color); 1748 } 1749 1750 .highlight .term { 1751 color: var(--sc-primary-accent-color); 1752 } 1753 1754 .highlight .gloss { 1755 color: var(--sc-primary-accent-color); 1756 } 1757 1758 .highlight .surplus { 1759 color: var(--sc-secondary-accent-color); 1760 } 1761 1762 .highlight .supplied { 1763 color: var(--sc-primary-color); 1764 } 1765 1766 .highlight .expanded { 1767 color: var(--sc-on-primary-secondary-text-color); 1768 } 1769 1770 .highlight .var { 1771 color: var(--sc-secondary-accent-color); 1772 } 1773 1774 .highlight .corr, 1775 .highlight .corrected { 1776 color: var(--sc-primary-accent-color); 1777 } 1778 1779 .highlight .unclear { 1780 color: var(--sc-on-primary-secondary-text-color); 1781 } 1782 1783 .highlight .metre { 1784 font-size: var(--sc-font-size-xxs); 1785 1786 position: absolute; 1787 1788 display: inline-block; 1789 1790 margin-top: -11px; 1791 1792 letter-spacing: 0.2em; 1793 1794 color: var(--sc-primary-accent-color); 1795 } 1796 1797 #simple_text_content .ref { 1798 display: none; 1799 } 1800 1801 #simple_text_content .legacy-reference .ref { 1802 font-family: var(--sc-sans-font); 1803 font-size: var(--sc-font-size-xxs); 1804 font-weight: 400; 1805 font-style: normal; 1806 1807 display: inline-block; 1808 1809 box-sizing: border-box; 1810 margin: 0 4px; 1811 padding: 0.1em 4px; 1812 1813 text-align: left; 1814 white-space: nowrap; 1815 text-decoration: none; 1816 letter-spacing: normal; 1817 1818 color: var(--sc-on-primary-secondary-text-color); 1819 border: 1px solid var(--sc-border-color); 1820 border-radius: 8px; 1821 background-color: var(--sc-secondary-background-color); 1822 1823 font-variant-caps: normal; 1824 } 1825 1826 /* helper metadata in HTML data- */ 1827 1828 .highlight [data-counter]::after { 1829 font-family: var(--sc-sans-font); 1830 font-size: var(--sc-font-size-xs); 1831 font-weight: 600; 1832 1833 margin: 0 0 0 0.5rem; 1834 padding: 0 0.25rem; 1835 1836 color: white; 1837 border-radius: 4px; 1838 background-color: var(--sc-icon-color); 1839 } 1840 1841 .highlight [data-counter]::after { 1842 content: attr(data-counter); 1843 } 1844 1845 .highlight [data-doxy]::before { 1846 font-family: var(--sc-sans-font); 1847 font-size: var(--sc-font-size-xs); 1848 font-weight: 600; 1849 1850 margin: 0 0.5rem 0 0; 1851 } 1852 1853 .highlight [data-doxy='orthodox']::before { 1854 content: 'ðð¿'; 1855 } 1856 1857 .highlight [data-doxy='heterodox']::before { 1858 content: 'ðð½'; 1859 } 1860 1861 .highlight [data-direction]::before { 1862 font-family: var(--sc-sans-font); 1863 font-size: var(--sc-font-size-xs); 1864 font-weight: 600; 1865 1866 margin: 0 0.5rem 0 0; 1867 } 1868 1869 .highlight [data-direction='forward']::before { 1870 content: 'ðð¾'; 1871 1872 color: var(--sc-icon-color); 1873 } 1874 1875 .highlight [data-direction='reverse']::before { 1876 content: 'ðð¼'; 1877 1878 color: var(--sc-icon-color); 1879 } 1880`},7329:function(t,e,a){a.r(e),a.d(e,{SCBottomSheet:function(){return o}});var i=a(6337),s=a(9911),n=a(3931),r=a(6781);class o extends((0,s.J)(i.WF)){static properties={currentDefine:{type:String},currentDefineDetail:{type:String},currentTarget:{type:Object},lookup:{type:Object},defineURL:{type:String}};static styles=i.AH` 1881 :host { 1882 font-family: var(--sc-sans-font); 1883 1884 position: fixed; 1885 z-index: 100; 1886 bottom: 0; 1887 1888 width: 100%; 1889 margin: 0; 1890 1891 background-color: var(--sc-secondary-background-color); 1892 box-shadow: var(--sc-shadow-elevation-2dp); 1893 1894 display: none; 1895 } 1896 1897 body, 1898 main, 1899 article, 1900 header, 1901 footer { 1902 display: flex; 1903 } 1904 1905 header { 1906 position: relative; 1907 1908 height: 32px; 1909 padding: 0 var(--sc-size-md); 1910 1911 color: var(--sc-primary-background-color); 1912 background-color: var(--sc-on-primary-secondary-text-color); 1913 1914 justify-content: space-between; 1915 align-items: center; 1916 } 1917 1918 header div { 1919 display: flex; 1920 flex-direction: row; 1921 1922 align-items: center; 1923 } 1924 1925 details { 1926 font-size: var(--sc-font-size-s); 1927 1928 font-stretch: condensed; 1929 1930 z-index: 1; 1931 1932 max-width: 720px; 1933 1934 color: var(--sc-primary-background-color); 1935 background-color: var(--sc-on-primary-secondary-text-color); 1936 } 1937 1938 details ul { 1939 margin-right: 1em; 1940 } 1941 1942 details a { 1943 color: inherit; 1944 1945 text-decoration: underline; 1946 text-decoration-color: var(--sc-primary-color-light); 1947 text-decoration-thickness: 0.15em; 1948 text-underline-offset: 0.15em; 1949 1950 transition: var(--sc-link-transition); 1951 } 1952 1953 details a:hover { 1954 text-decoration-color: var(--sc-primary-color); 1955 text-decoration-thickness: 0.15em; 1956 text-underline-offset: 0.15em; 1957 1958 background-color: var(--sc-primary-color-light-transparent); 1959 } 1960 1961 details a:active { 1962 background-color: var(--sc-primary-color-light); 1963 } 1964 1965 details a:visited { 1966 text-decoration-color: var(--sc-primary-color-dark); 1967 } 1968 1969 summary { 1970 white-space: nowrap; 1971 } 1972 1973 details > summary { 1974 position: relative; 1975 1976 display: flex; 1977 1978 padding: 2px 8px; 1979 1980 list-style: none; 1981 1982 cursor: pointer; 1983 } 1984 1985 summary { 1986 list-style-type: none; 1987 } 1988 1989 details .help-display-inner { 1990 position: absolute; 1991 z-index: 1000; 1992 right: 3vw; 1993 bottom: 48px; 1994 1995 max-width: 720px; 1996 margin-left: 3vw; 1997 1998 border-radius: 4px; 1999 background-color: var(--sc-on-primary-secondary-text-color); 2000 box-shadow: var(--sc-shadow-elevation-8dp); 2001 padding: 10px; 2002 } 2003 2004 .bottom-sheet-icon-label { 2005 font-family: 'Skolar Sans PE Compressed', var(--sc-sans-font); 2006 font-weight: 500; 2007 2008 margin-left: 4px; 2009 2010 align-self: center; 2011 } 2012 2013 header button { 2014 width: 100%; 2015 2016 border: none; 2017 background: none; 2018 } 2019 2020 #btnClose { 2021 font-size: var(--sc-font-size-s); 2022 2023 font-stretch: condensed; 2024 display: flex; 2025 2026 padding: 2px 8px; 2027 2028 cursor: pointer; 2029 2030 color: inherit; 2031 } 2032 2033 .icon { 2034 fill: var(--sc-icon-color); 2035 } 2036 2037 header > dfn { 2038 font-size: var(--sc-font-size-s); 2039 line-height: 1.333; 2040 2041 padding: 0 var(--sc-size-sm); 2042 2043 color: rgb(34, 33, 32); 2044 background-color: var(--sc-primary-color-light); 2045 } 2046 2047 main { 2048 justify-content: center; 2049 } 2050 2051 article { 2052 overflow-x: hidden; 2053 overflow-y: auto; 2054 2055 box-sizing: border-box; 2056 width: 960px; 2057 height: 120px; 2058 margin: 0 3vw; 2059 padding: 0; 2060 } 2061 2062 dl { 2063 font-size: var(--sc-font-size-s); 2064 2065 margin: 0; 2066 } 2067 2068 dd { 2069 display: grid; 2070 2071 margin: 0; 2072 2073 grid-row-start: 2; 2074 grid-auto-rows: min-content; 2075 } 2076 2077 dd a { 2078 text-decoration: underline; 2079 } 2080 2081 .entry a { 2082 font-weight: bold; 2083 2084 display: inline-block; 2085 2086 height: 100%; 2087 padding: 0 var(--sc-size-sm); 2088 2089 color: rgb(34, 33, 32); 2090 background-color: var(--sc-primary-color-light); 2091 2092 text-decoration-color: var(--sc-inverted-text-color); 2093 text-decoration-thickness: 0.15em; 2094 text-underline-offset: 0.15em; 2095 2096 transition: var(--sc-link-transition); 2097 } 2098 2099 .entry a:hover { 2100 background-color: var(--sc-primary-accent-color-light); 2101 2102 text-decoration-color: var(--sc-inverted-text-color); 2103 text-decoration-thickness: 0.15em; 2104 text-underline-offset: 0.15em; 2105 } 2106 2107 .grammar { 2108 font-size: var(--sc-font-size-xs); 2109 2110 font-style: italic; 2111 2112 color: var(--sc-on-primary-secondary-text-color); 2113 } 2114 2115 .definition { 2116 margin: 0; 2117 padding: 0; 2118 2119 counter-reset: definition-item-counter; 2120 2121 grid-row: 1; 2122 } 2123 2124 .definition li { 2125 line-height: 1.125; 2126 2127 display: inline-flex; 2128 2129 margin-right: 1em; 2130 margin-bottom: 4px; 2131 2132 align-items: baseline; 2133 gap: 0.5em; 2134 } 2135 2136 .definition li::before { 2137 font-size: var(--sc-font-size-xxs); 2138 font-weight: bold; 2139 2140 display: inline-flex; 2141 2142 width: 1em; 2143 height: 1em; 2144 2145 content: ' ' counter(definition-item-counter) ''; 2146 counter-increment: definition-item-counter; 2147 2148 color: var(--sc-on-primary-secondary-text-color); 2149 border: 2px solid var(--sc-icon-color); 2150 border-radius: 50%; 2151 2152 justify-content: center; 2153 align-items: center; 2154 flex-shrink: 0; 2155 } 2156 2157 .xr {
2158 font-size: var(--sc-font-size-xs); 2159 2160 margin: 0; 2161 padding: 0; 2162 } 2163 2164 .xr li { 2165 display: inline-flex; 2166 2167 gap: 1em; 2168 } 2169 2170 .xr a { 2171 color: var(--sc-on-primary-secondary-text-color); 2172 2173 text-decoration-color: var(--sc-primary-color); 2174 } 2175 2176 .xr a:before { 2177 content: 'See: '; 2178 } 2179 2180 .xr a:hover { 2181 color: var(--sc-primary-color); 2182 } 2183 2184 footer { 2185 box-sizing: border-box; 2186 height: 48px; 2187 2188 border-top: 1px solid rgba(0, 0, 0, 0.12); 2189 } 2190 2191 footer div { 2192 position: relative; 2193 2194 width: 50%; 2195 2196 text-align: center; 2197 2198 transition: var(--sc-link-transition); 2199 } 2200 2201 footer div:hover { 2202 background-color: var(--sc-tertiary-background-color); 2203 2204 transition: var(--sc-link-transition); 2205 } 2206 2207 footer div:active { 2208 background-color: var(--sc-border-color); 2209 2210 transition: var(--sc-link-transition); 2211 } 2212 2213 #next { 2214 border-left: 1px solid var(--sc-border-color); 2215 } 2216 2217 footer button { 2218 font-size: var(--sc-font-size-xxxl); 2219 2220 width: 100%; 2221 height: 100%; 2222 padding-bottom: 10px; 2223 2224 cursor: pointer; 2225 2226 color: var(--sc-icon-color); 2227 border: none; 2228 outline: none; 2229 background: none; 2230 } 2231 2232 #btnNext { 2233 border-left: 1px solid rgba(0, 0, 0, 0.14); 2234 } 2235 2236 @keyframes bottomSheetShow { 2237 from { 2238 bottom: -200px; 2239 } 2240 2241 to { 2242 bottom: 0; 2243 } 2244 } 2245 2246 @keyframes bottomSheetHide { 2247 from { 2248 bottom: 0; 2249 } 2250 2251 to { 2252 bottom: -200px; 2253 } 2254 } 2255 2256 .lookup-next-previous { 2257 fill: var(--sc-icon-color); 2258 } 2259 2260 ul { 2261 margin: 0px; 2262 padding: 0px; 2263 list-style-type: none; 2264 } 2265 `;constructor(){super(),this.localizedStringsPath="/localization/elements/interface",this.currentDefine="",this.currentDefineDetail="",this.currentTarget={},this.lookup={},this.defineURL="",this.chinesePunctuation='ï¼,!ï¼?ï¼;ï¼:ï¼ï¼()ï¼[]ã ããããï¹ï¹"ãâ§ããããï¹âãã'}render(){return i.qy` 2266 <div id="wrapper"> 2267 <header> 2268 <dfn>${this.currentDefine}</dfn> 2269 <div> 2270 <details class="help-display"> 2271 <summary> 2272 ${n.K.help} 2273 <span class="bottom-sheet-icon-label">${this.localize("bottomsheet:help")}</span> 2274 </summary> 2275 <div class="help-display-inner"> 2276 <ul> 2277 <li> 2278 ${(0,r._)(this.localize("bottomsheet:help1"))} 2279 </li> 2280 <li>${this.localize("bottomsheet:help2")}</li> 2281 <li>${this.localize("bottomsheet:help3")}</li> 2282 <li> 2283 ${this.localize("bottomsheet:help4")} 2284 <ul> 2285 <li> 2286 ${this.localize("bottomsheet:help5")} = 2287 <kbd>Alt</kbd> 2288 + 2289 <kbd>n</kbd> 2290 </li> 2291 <li> 2292 ${this.localize("bottomsheet:help6")} = 2293 <kbd>Alt</kbd> 2294 + 2295 <kbd>b</kbd> 2296 </li> 2297 </ul> 2298 ${(0,r._)(this.localize("bottomsheet:help7"))} 2299 </li> 2300 </ul> 2301 </div> 2302 </details> 2303 <button id="btnClose" @click=${this.hide}> 2304 ${n.K.cancel} 2305 <span class="bottom-sheet-icon-label">${this.localize("bottomsheet:close")}</span> 2306 </button> 2307 </div> 2308 </header> 2309 <main> 2310 <article>${this.currentDefineDetail}</article> 2311 </main> 2312 <footer> 2313 <div> 2314 <button accesskey="b" id="btnPrevious" @click=${this._previous}> 2315 ${n.K.arrow_left} 2316 <md-ripple></md-ripple> 2317 </button> 2318 </div> 2319 <div> 2320 <button accesskey="n" id="btnNext" @click=${this._next}>${n.K.arrow_right}</button> 2321 <md-ripple></md-ripple> 2322 </div> 2323 </footer> 2324 </div> 2325 `}hide(){this.style.animation="bottomSheetHide 200ms 1 ease-in normal forwards",setTimeout((()=>{this.style.display="none"}),100)}show(){this.style.display="block",this.style.animation="bottomSheetShow 200ms 1 ease-in normal forwards"}_previous(){const t=this.currentTarget.id.slice(5);if(t&&0!==parseInt(t,10)){let e=this.parentNode.querySelector("#word_"+(parseInt(t,10)-1));this.chinesePunctuation.includes(e.textContent)&&(e=this.parentNode.querySelector("#word_"+(parseInt(t,10)-2))),e&&this._setProperties(e)}}_next(){const t=this.currentTarget.id.slice(5);if(t){let e=this.parentNode.querySelector(`#word_${parseInt(t,10)+1}`);this.chinesePunctuation.includes(e.textContent)&&(e=this.parentNode.querySelector(`#word_${parseInt(t,10)+2}`)),e&&this._setProperties(e)}}_removeDefineFocusedClass(){this.parentNode.querySelectorAll(".spanFocused").forEach((t=>{t.classList.remove("spanFocused")}))}_setProperties(t){this._removeDefineFocusedClass();let e="";
2325e="chinese_lookup"===this.lookup.id?this.getSentenceText()||t.dataset.latin_text||t.textContent:t.dataset.latin_text||t.textContent,this.currentDefine=e;const a=this.lookup.lookupWord(e);this.currentDefineDetail=a.html,t.classList.add("spanFocused"),this.currentTarget=t}getSentenceText(){const t=[];t.push(this.currentTarget.textContent),this.currentTarget.classList.add("spanFocused");let e=this.currentTarget.id.slice(5);if(e){const a=3,i=3;e=parseInt(e,10);for(let i=e-1;i>e-a;i--){const e=this.currentTarget.parentNode.querySelector(`#word_${parseInt(i,10)}`);if(e){if(this.chinesePunctuation.includes(e.textContent))break;t.unshift(e.textContent),e.classList.add("spanFocused")}}for(let a=e+1;a<e+i;a++){const e=this.currentTarget.parentNode.querySelector(`#word_${parseInt(a,10)}`);if(e){if(this.chinesePunctuation.includes(e.textContent))break;t.push(e.textContent),e.classList.add("spanFocused")}}}return t?.join("")}updated(t){if(super.updated(t),t.has("currentDefineDetail")){if(""===this.currentDefineDetail)return;const t=this.currentDefineDetail,e=document.createElement("div");e.innerHTML=t;const a=e.querySelector("div a");a&&(this.defineURL=a.href)}}}customElements.define("sc-bottom-sheet",o)},7877:function(t,e,a){a.a(t,(async function(t,i){try{a.r(e),a.d(e,{SCTextPageSelector:function(){return g}});var s=a(6337),n=a(8759),r=(a(9545),a(5523),a(3259),a(8412),a(7282)),o=a(9911),l=a(7518),c=a(3182),h=a(615),d=a(9881),p=a(1404),u=t([n,h,d]);[n,h,d]=u.then?(await u)():u;class g extends((0,o.J)(s.WF)){static properties={responseData:{type:Object,state:!0},lastError:{type:Object,state:!0},author:{type:String,state:!0},suttaId:{type:String,state:!0},langIsoCode:{type:String,state:!0},isSegmentedText:{type:Boolean,state:!0},suttaplex:{type:Object,state:!0},translatedSutta:{type:Object,state:!0},rootSutta:{type:Object,state:!0},bilaraRootSutta:{type:Object,state:!0},bilaraTranslatedSutta:{type:Object,state:!0},bilaraSuttaKeysOrder:{type:Array,state:!0},suttaReference:{type:Object,state:!0},suttaComment:{type:Object,state:!0},suttaVariant:{type:Object,state:!0},suttaMarkup:{type:String,state:!0},markup:{type:String,state:!0},bilaraSuttaMarkup:{type:String,state:!0},localizedStringsPath:{type:String,state:!0},authorUid:{type:String,state:!0},authorShort:{type:String,state:!0},next:{type:Object,state:!0},previous:{type:Object,state:!0},expansionReturns:{type:Array,state:!0},showedLanguagePrompt:{type:Boolean,state:!0},isLoading:{type:Boolean,state:!0}};constructor(){super(),this.localizedStringsPath="/localization/elements/interface",this.showedLanguagePrompt=r.M.getState().showedLanguagePrompt,this.siteLanguage=r.M.getState().siteLanguage,this.isLoading=!1,l.I.changeLinearProgressActiveState(!1),this.langIsoCode=r.M.getState().currentRoute.params.langIsoCode,this.authorUid=r.M.getState().currentRoute.params.authorUid,this.suttaId=r.M.getState().currentRoute.params?.suttaId,this.SuttaParallelsDisplayed=!1,this.#t()}createRenderRoot(){return this}render(){return s.qy` 2326 <style> 2327 sc-text-page-selector { 2328 font-family: var(--sc-serif-font); 2329 font-weight: 400; 2330 line-height: 1.5; 2331 color: var(--sc-on-primary-primary-text-color); 2332 2333 display: flex; 2334 flex-direction: column; 2335 } 2336 2337 .text-options { 2338 padding: var(--sc-size-lg); 2339 } 2340 2341 .wrapper { 2342 min-height: 100vh; 2343 padding-bottom: 64px; 2344 } 2345 </style> 2346 <div class="wrapper"> 2347 ${this.displaySimpleTextTemplate} ${this.displaySegmentedTextTemplate} 2348 ${this.displayErrorTemplate} 2349 </div> 2350 ${this.displayStepper} 2351 <sc-text-image id="sc_text_image"></sc-text-image> 2352 ${this.#e(this.responseData,this.expansionReturns)} 2353 `}get displayStepper(){return this._shouldDisplayStepper()?s.qy` 2354 <sc-text-stepper 2355 .next=${this.next} 2356 .previous=${this.previous} 2357 .lang=${this.langIsoCode} 2358 ></sc-text-stepper> 2359 `:""}get displayErrorTemplate(){return this._shouldDisplayError()&&!this.isLoading?s.qy` <sc-error-icon type=${this.lastError.type||"data-load-error"}></sc-error-icon> `:""}get displaySimpleTextTemplate(){return this._shouldHideSimpleText()?"":s.qy` 2360 <sc-text-legacy 2361 id="simple_text" 2362 .sutta=${this.translatedSutta||this.rootSutta} 2363 .isLoading=${this.isLoading} 2364 .error=${this.lastError} 2365 ?hidden=${this._shouldHideSimpleText()} 2366 ></sc-text-legacy> 2367 `}get displaySegmentedTextTemplate(){return this.responseData?.root_text?this._shouldHideSegmentedText()?"":s.qy` 2368 <sc-text-bilara 2369 id="segmented_text" 2370 .rootSutta=${this.rootSutta} 2371 .bilaraRootSutta=${this.bilaraRootSutta} 2372 .markup=${this.suttaMarkup} 2373 .translatedSutta=${this.translatedSutta} 2374 .bilaraTranslatedSutta=${this.bilaraTranslatedSutta} 2375 .suttaComment=${this.suttaComment} 2376 .suttaReference=${this.suttaReference} 2377 .suttaVariant=${this.suttaVariant} 2378 .suttaId=${this.suttaId} 2379 .isRangeSutta=${this.isRangeSutta} 2380 .range_uid=${this.range_uid} 2381 .transformedSuttaId=${this.transformedSuttaId} 2382 .suttaIllustrations=${this.suttaIllustrations} 2383 ></sc-text-bilara> 2384 `:""}firstUpdated(){this._refreshData()}_refreshData(){this._paramChanged(),this.refreshing=!0,(0,d.TF)(this.suttaId),this.refreshing=!1}get actions(){return{setShowedLanguagePrompt(){r.M.dispatch({type:"SET_SHOWED_LANGUAGE_PROMPT",showedLanguagePrompt:!0})}}}connectedCallback(){super.connectedCallback(),this.addEventListener("show-image",(t=>{const e=this.querySelector("#sc_text_image");e&&e.showImage(t.detail)}))}_updateNav(){if(!this.responseData||this.refreshing)return;this.navArray=r.M.getState().navigationArray;let t=this.responseData.translation?this.responseData.translation.title:"";if(t||(t=this.responseData.suttaplex.translated_title||this.responseData.suttaplex.original_title),t=this.responseData.suttaplex.acronym||t,t?.includes("//")){const e=t.split("//");2===e.length&&(t=e[0])}const e=this.navArray.findIndex((t=>"sutta"===t?.type));-1!==e&&delete this.navArray[e],this.navArray.push({uid:this.suttaId,title:t,url:r.M.getState().currentRoute.path,type:"sutta",index:99}),l.I.setNavigation(this.navArray)}updated(t){super.updated(t),t.has("responseData")&&this._onResponse()}stateChanged(t){super.stateChanged(t),t.currentRoute.params.langIsoCode!==this.langIsoCode&&t.currentRoute.params.langIsoCode&&(this.langIsoCode=t.currentRoute.params.langIsoCode,this._paramChanged()),t.currentRoute.params.authorUid!==this.authorUid&&t.currentRoute.params.authorUid&&(this.authorUid=t.currentRoute.params.authorUid,this._paramChanged()),t.currentRoute.params.suttaId!==this.suttaId&&t.currentRoute.params.suttaId&&(this.suttaId=t.currentRoute.params.suttaId,this.isRangeSutta=!1,this._refreshData()),this.siteLanguage!==t.siteLanguage&&(this.siteLanguage=t.siteLanguage,this._refreshData())}languageLoaded(){"en"===this.langIsoCode||this.showedLanguagePrompt||(this.actions.setShowedLanguagePrompt(),this._showLanguagePromptToast())}_onResponse(){this.responseData&&(this.responseData.root_text||this.responseData.translation||this.responseData.bilara_root_text||this.responseData.bilara_translated_text)?this.setProperties():this.responseData.root_text||this.responseData.translation?this.lastError=null:(this.lastError={type:"data-load-error"},(0,p.w)(this,"sc-navigate",{pathname:`/${this.suttaId}`}))}setProperties(){if(this.responseData){if(this.isSegmentedText=!!this.responseData.segmented,this.suttaplex=this.responseData.suttaplex,this.translatedSutta=this.responseData.translation,this.rootSutta=this.responseData.root_text,!this.responseData.root_text&&!this.responseData.translation){if(this.responseData.candidate_authors.length>0)return void(0,p.w)(this,"sc-navigate",{pathname:`/${this.suttaId}/${this.siteLanguage}/${this.responseData.candidate_authors[0]}`});this.showParallelsTopSheet();const t=this.responseData.bilara_root_text;return void(0,p.w)(this,"sc-navigate",{pathname:`/${t.uid}/${t.lang}/${t.author_uid}`})}this.responseData.translation||!this.responseData.root_text||"pli"===this.langIsoCode&&"lzh"===this.langIsoCode||this.showParallelsTopSheet(),this.translatedSutta?(this.next=this.translatedSutta.next,this.previous=this.translatedSutta.previous):this.rootSutta&&(this.next=this.rootSutta.next,this.previous=this.rootSutta.previous)}this.next&&!this.next.name&&(this.next.name=this._transformId(this.next.uid,this.expansionReturns)),this.previous&&!this.previous.name&&(this.previous.name=this._transformId(this.previous.uid,this.expansionReturns)),this._getBilaraText(),this.responseData.root_text.uid!==this.suttaId&&(this.isRangeSutta=!0,this.range_uid=this.responseData.range_uid,this._serveRangeSuttasPerSutta()),this._updateNav()}
2384showParallelsTopSheet(){if(!this.SuttaParallelsDisplayed){this.SuttaParallelsDisplayed=!0;const t=document.querySelector("sc-site-layout");t?.querySelector("#action_items")?.showParallelsTopSheet()}}_getSuttaTextUrl(){return this.authorUid?`${c.Sw}/suttas/${this.suttaId}/${this.authorUid}?lang=${this.langIsoCode}&siteLanguage=${this.siteLanguage}`:`${c.Sw}/suttas/${this.suttaId}?lang=${this.langIsoCode}&siteLanguage=${this.siteLanguage}`}_getBilaraTextUrl(){let{suttaId:t}=this;return this.responseData.root_text.uid!==this.suttaId&&(t=this.responseData.root_text.uid),this.authorUid?`${c.Sw}/bilarasuttas/${t}/${this.authorUid}?lang=${this.langIsoCode}`:`${c.Sw}/bilarasuttas/${t}?lang=${this.langIsoCode}`}_serveRangeSuttasPerSutta(){if((0,d.TF)(this.range_uid),this.range_uid.split(".").length>1&&this.range_uid.split(".")[1].split("-").length>1){const t=parseInt(this.suttaId.split(".")[1],10)-1,e=parseInt(this.suttaId.split(".")[1],10)+1;if(t>=parseInt(this._extractVaggaBeginUid(this.responseData.vaggaBegin),10)){const t=`${this.suttaId.split(".")[0]}.${parseInt(this.suttaId.split(".")[1],10)-1}`,e=this._transformId(`${this.suttaId.split(".")[0]}.${parseInt(this.suttaId.split(".")[1],10)-1}`,this.expansionReturns);this._setPreviousSuttaInfo(t,e)}if(e<=parseInt(this._extractVaggaEndUid(this.responseData.vaggaEnd),10)){const t=`${this.suttaId.split(".")[0]}.${parseInt(this.suttaId.split(".")[1],10)+1}`,e=this._transformId(`${this.suttaId.split(".")[0]}.${parseInt(this.suttaId.split(".")[1],10)+1}`,this.expansionReturns);this._setNextSuttaInfo(t,e)}}"pli-tv-bi-vb-sk1"===this.suttaId&&(this.previous=null,this._setNextSuttaInfo("pli-tv-bi-vb-sk75","pli-tv-bi-vb-sk75")),"pli-tv-bi-vb-sk75"===this.suttaId&&(this.next=null,this._setPreviousSuttaInfo("pli-tv-bi-vb-sk1","pli-tv-bi-vb-sk1"));const t=this.suttaId.match(/^(p?dhp)/);if(!t)return;const e=t[1],a=parseInt(this.suttaId.replace(e,""),10)-1,i=parseInt(this.suttaId.replace(e,""),10)+1,s=parseInt(this.responseData.vaggaBegin.replace(e,"").split("-")[0],10),n=parseInt(this.responseData.vaggaEnd.replace(e,"").split("-")[1],10);if(a>=s){const t=`${e}${a}`;this._setPreviousSuttaInfo(t,this._transformId(t,this.expansionReturns))}if(i<=n){const t=`${e}${i}`;this._setNextSuttaInfo(t,this._transformId(t,this.expansionReturns))}}_setNextSuttaInfo(t,e){this.next={author_uid:this.authorUid,lang:this.langIsoCode,uid:t,name:e}}_setPreviousSuttaInfo(t,e){this.previous={author_uid:this.authorUid,lang:this.langIsoCode,uid:t,name:e}}_extractVaggaBeginUid(t){return t.split(".").length>1&&t.split(".")[1].split("-").length>1?t.split(".")[1].split("-")[0]:t.split(".").length>1&&1===t.split(".")[1].split("-").length?t.split(".")[1]:0}_extractVaggaEndUid(t){return t.split(".").length>1&&t.split(".")[1].split("-").length>1?t.split(".")[1].split("-")[1]:t.split(".").length>1&&1===t.split(".")[1].split("-").length?t.split(".")[1]:0}async _fetchSuttaText(){this.isLoading=!0,l.I.changeLinearProgressActiveState(!0);try{this.responseData=await(await fetch(this._getSuttaTextUrl())).json()}catch(t){this.lastError=t}this.isLoading=!1,l.I.changeLinearProgressActiveState(!1)}async _fetchBilaraText(){if(this.suttaId){this.isLoading=!0,l.I.changeLinearProgressActiveState(!0);try{const t=await(await fetch(this._getBilaraTextUrl())).json();this.bilaraRootSutta=t.root_text,this.bilaraTranslatedSutta=t.translation_text,this.bilaraSuttaMarkup=t.html_text,this.bilaraSuttaKeysOrder=t.keys_order,this.suttaReference=t.reference_text,this.suttaComment=t.comment_text,this.suttaVariant=t.variant_text,this.suttaIllustrations=t.illustrations||[]}catch(t){this.lastError=t}this.isLoading=!1,l.I.changeLinearProgressActiveState(!1)}}_getBilaraText(){this._generateMarkup()}async _generateMarkup(){if(await this._fetchBilaraText(),!this.bilaraSuttaMarkup)return;let t="";this.bilaraSuttaKeysOrder.forEach((e=>{const a=this.bilaraSuttaMarkup[e];"~"!==e?a.includes("{}")?t+=a.replace(/{}/,`<span class="segment" id="${e}"></span>`):t+=`${a}<span class="segment" id="${e}"></span>`:t+=a})),t=t.replace(/<article>/,"<article><header>"),t=t.replace(/<\/h1><\/div>/,"</h1></div></header>"),t=t.replace(/{}/g,""),this.suttaMarkup=t}_getExpansionUrl(){return`${c.Sw}/expansion`}async _fetchExpansion(){l.I.changeLinearProgressActiveState(!0);try{this.expansionReturns=await(await fetch(this._getExpansionUrl())).json()}catch(t){this.lastError=t}l.I.changeLinearProgressActiveState(!1)}_paramChanged(){setTimeout((()=>{this.expansionReturns||this._fetchExpansion(),this._fetchSuttaText()}),50)}_shouldHideSimpleText(){return void 0===this.isSegmentedText||this.isSegmentedText||this.isLoading}_shouldHideSegmentedText(){return void 0===this.isSegmentedText||!this.isSegmentedText||this.isLoading}_shouldDisplayStepper(){return!this.isLoading&&(this.next||this.previous)}_shouldDisplayError(){return this.lastError}#e(t,e){if(!t?.translation)return;let a=this.localize("interface:metaDescriptionText");
2384t.suttaplex.blurb&&(a=t.suttaplex.blurb);let i=t.suttaplex?t.suttaplex.original_title:"";i||(i=t.root_text?t.root_text.title:t.translation.title);const s=t.root_text?t.root_text.author:"",n=t.translation?t.translation.author:s;let r=`${t.suttaplex.acronym?t.suttaplex.acronym.split(/\/\//)[0]:this._transformId(t.suttaplex.uid,e)}: ${i}${n?`â${n}`:""}`;this.isRangeSutta&&(this.transformedSuttaId=this._transformId(this.suttaId,this.expansionReturns),i=this.transformedSuttaId,r=`${i}${n?`â${n}`:""}`),(0,p.w)(document,"metadata",{pageTitle:r,title:`${i}${n?`â${n}`:""}`,description:a,openGraphType:"article"}),i||(i=this._transformId(this.suttaId,this.expansionReturns)),l.I.changeToolbarTitle(`${i}${n?`â${n}`:""}`)}_transformId(t,e){if(!t||!e)return"";let a="";const i=t.split("-");let s="";try{return i.forEach((t=>{if(!e[0][t]){const e=t.match(/\d+.*/g);e&&(s=`${e[0]}â`);const a=t.match(/[a-z]*/g);a&&(t=a[0])}t&&e[0][t]?a+=`${e[0][t][0]} ${s}`:a+=s})),a.replace(/â\s*$/,"")}catch(e){return console.error(e),t}}_showLanguagePromptToast(){(0,p.w)(this,"show-sc-toast",{toastType:"info",message:this.localize("text:languagePromptMessage")})}#t(){(0,h.tt)(this.suttaId)&&(0,p.w)(this,"sc-navigate",{pathname:`/${this.suttaId}`})}}customElements.define("sc-text-page-selector",g),i()}catch(t){i(t)}}))},7909:function(t,e,a){a.d(e,{x:function(){return i}});const i=a(6337).AH` 2385 /* styles unique to bilara texts */ 2386 /* verses */ 2387 2388 blockquote { 2389 margin: 0; 2390 } 2391 2392 /* lookup */ 2393 2394 .spanFocused { 2395 color: rgb(34, 33, 32); 2396 background-color: var(--sc-primary-color-light); 2397 } 2398 2399 /* notes */ 2400 2401 /* Anchor tooltips. */ 2402 article { 2403 position: relative; 2404 } 2405 2406 .comment, 2407 .variant { 2408 font-family: var(--sc-sans-font); 2409 font-size: var(--sc-font-size-s); 2410 font-weight: 400; 2411 font-style: normal; 2412 line-height: 1.3333; 2413 2414 z-index: 10; 2415 2416 display: inline-block; 2417 2418 box-sizing: border-box; 2419 padding: var(--sc-size-sm) var(--sc-size-md); 2420 2421 text-align: left; 2422 text-indent: 0; 2423 text-transform: none; 2424 letter-spacing: normal; 2425 2426 color: var(--sc-on-tertiary-secondary-text-color); 2427 border-radius: var(--sc-mid-border-radius); 2428 background-color: var(--sc-tertiary-background-color); 2429 2430 font-variant-caps: normal; 2431 } 2432 2433 .comment:hover, 2434 .variant:hover { 2435 cursor: help; 2436 } 2437 2438 .comment:empty, 2439 .variant:empty { 2440 display: none; 2441 } 2442 2443 /* Set shared styles for the tooltip, but don't show it. Specify classes, avoid unattributed attribute selector for performance.*/ 2444 2445 .comment[data-tooltip]::after, 2446 .variant[data-tooltip]::after { 2447 position: absolute; 2448 z-index: 10; 2449 left: 50%; 2450 2451 display: none; 2452 2453 box-sizing: border-box; 2454 width: 300px; 2455 margin-left: -150px; 2456 padding: var(--sc-size-sm) var(--sc-size-md); 2457 2458 content: attr(data-tooltip); 2459 white-space: normal; 2460 2461 color: var(--sc-on-tertiary-secondary-text-color); 2462 border-radius: var(--sc-mid-border-radius); 2463 background-color: var(--sc-tertiary-background-color); 2464 box-shadow: var(--sc-shadow-elevation-8dp); 2465 } 2466 2467 [data-tooltip]:hover { 2468 cursor: inherit; 2469 } 2470 2471 /* references */ 2472 2473 .reference { 2474 overflow-wrap: anywhere; 2475 word-break: break-all; 2476 overflow-wrap: break-word; 2477 } 2478 2479 .reference a { 2480 font-family: var(--sc-sans-font); 2481 font-size: var(--sc-font-size-xxs); 2482 font-weight: 400; 2483 font-style: normal; 2484 2485 display: inline-block; 2486 2487 box-sizing: border-box; 2488 margin-right: 0.5em; 2489 padding: 0.1em 0.5em; 2490 2491 text-align: left; 2492 text-indent: 0; 2493 text-transform: none; 2494 white-space: nowrap; 2495 2496 letter-spacing: normal; 2497 2498 color: var(--sc-on-primary-secondary-text-color); 2499 border: 1px solid var(--sc-border-color); 2500 border-radius: 8px; 2501 background-color: var(--sc-secondary-background-color); 2502 2503 font-variant-caps: normal; 2504 } 2505 2506 header .reference, 2507 h2 .reference, 2508 h3 .reference, 2509 h4 .reference, 2510 h5 .reference, 2511 h6 .reference { 2512 display: none; 2513 } 2514`},8412:function(t,e,a){var i=a(6337),s=a(9911),n=a(3931);class r extends((0,s.J)(i.WF)){static properties={messages:{type:String},type:{type:String}};static styles=i.AH` 2515 .error { 2516 display: flex; 2517 align-items: center; 2518 justify-content: center; 2519 flex-direction: column; 2520 gap: 2em; 2521 font-family: var(--sc-sans-font); 2522 font-size: var(--sc-font-size-xxxl); 2523 color: var(--sc-on-primary-secondary-text-color); 2524 text-align: center; 2525 } 2526 2527 .icon { 2528 width: var(--sc-size-xxl); 2529 height: var(--sc-size-xxl); 2530 } 2531 `;constructor(){super(),this.localizedStringsPath="/localization/elements/interface",this.messages={"no-network":{image:"nonetwork",title:"networkError",message:"offline"},"general-error":{image:"generalerror",title:"generalError",message:"generalError"},"page-not-found":{image:"pagenotfound",title:"pageNotFound",message:"pageNotFound"},"data-load-error":{image:"dataloaderror",title:"dataLoadError",message:"dataLoadError"},"connect-to-internet":{image:"connecttointernet",title:"connectToInternet",message:"connectToInternet"},"translation-text-load-error":{image:"dataloaderror",title:"dataLoadError",message:"translationDataLoadError"}}}render(){const{image:t,message:e}=this.messages[this.type];return i.qy` 2532 <div class="error"> 2533 ${n.K[t]} 2534 <div>${this.localize(`error:${e}`)}</div> 2535 </div> 2536 `}}customElements.define("sc-error-icon",r)},8759:function(t,e,a){a.a(t,(async function(t,e){try{var i=a(6337),s=a(6781),n=a(7282),r=a(3182),o=a(9911),l=a(7518),c=a(7394),h=a(6655),d=a(7909),p=a(4666),u=a(9232),g=a(9881),m=a(4243),f=a(3982),y=t([g,m]);[g,m]=y.then?(await y)():y;class S extends((0,o.J)(i.WF)){static properties={rootSutta:{type:Object},bilaraRootSutta:{type:Object},translatedSutta:{type:Object},bilaraTranslatedSutta:{type:Object},suttaId:{type:String},suttaReference:{type:Object},suttaComment:{type:Object},suttaVariant:{type:Object},suttaIllustrations:{type:Array},chosenTextView:{type:String},displayedReferences:{type:Array},chosenNoteDisplayType:{type:String},paliScript:{type:String},markup:{type:String},isPaliLookupEnabled:{type:Boolean},spansForWordsGenerated:{type:Boolean},spansForGraphsGenerated:{type:Boolean},isChineseLookupEnabled:{type:Boolean},hasScriptBeenChanged:{type:Boolean},localizedStringsPath:{type:String},currentStyles:{type:Object},userSelectStyles:{type:Object},rootTextFirst:{type:Boolean},lineByLineRootTextFirstStyles:{type:Object},referencesDisplayStyles:{type:Object},notesDisplayStyles:{type:Object},showHighlighting:{type:Boolean},showIllustrations:{type:Boolean},rootEdition:{type:Array},isRangeSutta:{type:Boolean},transformedSuttaId:{type:String},isTextOptionsMismatchSavedSettings:{type:Boolean},shouldRestoreUserSettings:{type:Boolean}};constructor(){super();const{textOptions:t}=n.M.getState();this.isPaliLookupEnabled=t.paliLookupActivated,this.spansForWordsGenerated=!1,this.spansForGraphsGenerated=!1,this.isChineseLookupEnabled=t.chineseLookupActivated,this.rootTextFirst=t.rootTextFirst,this.hasScriptBeenChanged=!1,this.localizedStringsPath="/localization/elements/interface",this.commentSpanRectInfo=new Map,this.rootEdition=[],this._setTextViewState(),this._hashChangeHandler=()=>{setTimeout((()=>{const t=window.location.hash.slice(1).split("--")[0];this._scrollToSection(t)}),0)},this._onClickHandler=()=>{l.I.changeDisplaySettingMenuState(!1)},this.mapStyles=new Map([["sidenotes_plain",p.f7],["sidenotes_sidebyside",p.K9],["sidenotes_linebyline",p.Kl],["none_plain",p.HB],["asterisk_plain",p.HB],["none_sidebyside",p.GB],["asterisk_sidebyside",p.GB],["none_linebyline",p.SF],["asterisk_linebyline",p.SF],["pali",p.hi],["sidenotes_root",p.fR]]),this.mapNoteDisplayStyles=new Map([["none",p.FA],["asterisk",p.GS]]),this.isMultiSutta=!1,this.isTraditionalChinese=!1,this.lineByLineRootTextFirstStyles="",this._selectionEventsActive=!1,this._handleContentMouseOver=null,this.viewCompose="",this.floatingTooltipStyles=""}createRenderRoot(){return this}render(){return i.qy` 2537 <style> 2538 ${p.se} 2539 ${h.B} 2540 ${d.x} 2541 ${u.b} 2542 ${this.floatingTooltipStyles} 2543 </style> 2544 ${this.currentStyles} 2545 ${this.referencesDisplayStyles} 2546 ${this.notesDisplayStyles} 2547 ${this.userSelectStyles} 2548 ${this.lineByLineRootTextFirstStyles} 2549 2550 <main>
2551 <div id="segmented_text_content" class="html-text-content"> 2552 ${(0,s._)(this.markup||" ")} 2553 </div> 2554 </main> 2555 2556 <slot name="pali_lookup"></slot> 2557 <slot name="chinese_lookup"></slot> 2558 <slot></slot> 2559 <slot name="bottom_sheet"></slot> 2560 `}firstUpdated(){this.scActionItems=document.querySelector("sc-site-layout").querySelector("#action_items"),window.addEventListener("hashchange",this._hashChangeHandler),this.addEventListener("click",this._onClickHandler),this._updateView(),this._updateURLSearchParams(),this.scActionItems?.showSpeakerButton(),this.isMultiSutta=this.checkIfMultiSutta(this.suttaId),this._showChineseConverterButton(),this.isTraditionalChinese="lzh"===this.translatedSutta?.lang||"lzh"===this.rootSutta?.lang}_showChineseConverterButton(){const t="lzh"===this.translatedSutta?.lang||"lzh"===this.rootSutta?.lang||"zh"===this.translatedSutta?.lang||"zh"===this.rootSutta?.lang;l.I.changeDisplayChineseConverterState(t)}_setupSelectionEvents(){if(this._cleanupSelectionEvents(),"sidebyside"!==this.chosenTextView)return;const t=this.querySelector("#segmented_text_content");t&&(this._handleContentMouseOver=t=>{const e=t.target.closest(".translation"),a=t.target.closest(".root");e&&this.userSelectStyles!==p.LN?this.userSelectStyles=p.LN:a&&this.userSelectStyles!==p.sK&&(this.userSelectStyles=p.sK)},t.addEventListener("mousedown",this._handleContentMouseOver),this._selectionEventsActive=!0)}_cleanupSelectionEvents(){const t=this.querySelector("#segmented_text_content");t&&this._handleContentMouseOver&&t.removeEventListener("mousedown",this._handleContentMouseOver),"sidebyside"!==this.chosenTextView&&(this.userSelectStyles=null),this._selectionEventsActive=!1}checkIfMultiSutta(t){if(!t||"string"!=typeof t)return!1;let e=t.split(".");if(e.length<2)return!1;let a=e[1];if(a.includes("-")){let t=a.split("-");if(2!==t.length)return!1;if(!Number.isNaN(Number(t[0]))&&!Number.isNaN(Number(t[1])))return!0}return!1}async _initializeFloatingTooltips(){if("none"!==this.chosenNoteDisplayType&&"sidenotes"!==this.chosenNoteDisplayType){if(this.floatingTooltipStyles=p.C4,!this.commentManager){const{CommentTooltipManager:t}=await Promise.all([a.e(7663),a.e(3807)]).then(a.bind(a,3807));this.commentManager=new t}setTimeout((()=>{this.commentManager.initializeComments()}),100)}else this.floatingTooltipStyles=""}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("hashchange",this._hashChangeHandler),window.removeEventListener("click",this._onClickHandler),this.querySelector("#segmented_text_content")?.removeEventListener("mousedown",this._handleContentMouseOver),this.commentManager&&this.commentManager.cleanup()}_updateView(){l.I.changeLinearProgressActiveState(!0);try{this._addTranslationText(),(this._isBilingualView()||this._onlyRootTextVisible())&&(this.spansForWordsGenerated=!1,"latin"===this.paliScript||"pli"!==this.rootSutta.lang?this._addRootText():this._setScript()),this.displayedReferences?.length>0&&"none"!==this.displayedReferences?.[0]?(this._deleteReference(),this._addSCReference(),this._addReferenceText()):this._deleteReference(),window.location.href.includes("#")&&(this._deleteSCReference(),this._addSCReference(),this._addReferenceText()),this._addVariantText(),this._addCommentText(),this._checkAVIFSupport().then((t=>{t&&this._addIllustrations()})),this._scheduleNonCriticalUpdates(),setTimeout((()=>{this._updateTextViewStylesBasedOnState()}),0),l.I.changeSuttaMetaText(""),this.isRangeSutta||l.I.changeSuttaPublicationInfo({uid:this.suttaId,lang:this.translatedSutta?.lang||"en",authorUid:this.translatedSutta?.author_uid}),this._serveRangeSuttasPerSutta()}finally{l.I.changeLinearProgressActiveState(!1)}}async _scheduleNonCriticalUpdates(){"requestIdleCallback"in window?requestIdleCallback((()=>{this._nonCriticalUpdates()})):setTimeout((()=>{this._nonCriticalUpdates()}),100)}_nonCriticalUpdates(){this._paliLookupStateChanged(),this._chineseLookupStateChanged(),this._showHighlightingChanged(),this._hashChangeHandler(),this._prepareNavigation(),this._setupSelectionEvents(),this._updateURLSearchParams()}_isBilingualView(){return this.chosenTextView.includes("linebyline")||this.chosenTextView.includes("sidebyside")}_onlyRootTextVisible(){return!this.bilaraTranslatedSutta&&this.bilaraRootSutta}toggleChineseConvert(){if(!this.bilaraRootSutta)return"";try{const t=this.isTraditionalChinese?{from:"tw",to:"cn"}:{from:"cn",to:"tw"},e=f.Tq(t),a=t=>{if(!t)return null;const a={};for(const[i,s]of Object.entries(t))a[i]="string"==typeof s?e(s):s;return a};return this.bilaraRootSutta=a(this.bilaraRootSutta),this.bilaraTranslatedSutta=a(this.bilaraTranslatedSutta),this.isTraditionalChinese=!this.isTraditionalChinese,this._updateView(),""}catch(t){return"Simplified Chinese to Traditional Chinese conversion failed."}}_serveRangeSuttasPerSutta(){if(this.isRangeSutta){const t=[],e=this.querySelectorAll("article");
2560if(/^(p?dhp)/.test(this.suttaId)||e.forEach((e=>{t.push(e.id),e.style.display="none"})),/^(p?dhp)/.test(this.suttaId)){const t=this.querySelectorAll("article span.segment");for(const e of t)if(e.id.split(":")[0].toLowerCase()!==this.suttaId.toLowerCase()){const t=this.querySelector(`#${CSS.escape(e.id)} + blockquote`);t&&(t.style.display="none"),this.querySelector(`#${CSS.escape(e.id)}`).style.display="none"}const e=this.querySelectorAll("header h1 span.segment");for(const t of e)t.style.display=""}let a=this.querySelector(`#${CSS.escape(this.suttaId)}`);if(a)a.style.display="block";else for(const e of t)if(this.rootSutta.uid.indexOf(".")>-1&&e.indexOf("-")>-1){const t=this.suttaId.split(".")[1],i=e.split(".")[1],s=i.split("-")[0],n=i.split("-")[1];if(parseInt(t,10)<=parseInt(n,10)&&parseInt(t,10)>=parseInt(s,10)&&this.rootSutta.uid.indexOf("-")>-1){a=this.querySelector(`#${CSS.escape(e)}`),a&&(a.style.display="block");break}}setTimeout((()=>{if(!/^(p?dhp)/.test(this.suttaId)){const t=this.suttaId.split(".")[1];this._updateSuttaTitle(".range-title .root .text",t),this._updateSuttaTitle(".range-title .translation .text",t),this._updateSuttaTitle(".sutta-title .root .text",t),this._updateSuttaTitle(".sutta-title .translation .text",t),this._updateSuttaTitle(`#${CSS.escape(this.suttaId)} h2 .root .text`,""),this._updateSuttaTitle(`#${CSS.escape(this.suttaId)} h2 .translation .text`,"")}const t=n.M.getState().navigationArray,e=t[t.length-1];"home"!==e.uid&&(e.title=this.transformedSuttaId,(0,g.dI)(t))}),100),l.I.changeSuttaPublicationInfo({uid:this.range_uid,lang:this.translatedSutta?.lang||"en",authorUid:this.translatedSutta?.author_uid}),l.I.showToc([]),this.scActionItems.range_uid=this.range_uid}else this.scActionItems.range_uid=""}_updateSuttaTitle(t,e){const a=this.querySelector(t);a&&(a.textContent=e)}_segmentedTextContentElement(){return this.querySelector("#segmented_text_content")}_articleElement(){return this.querySelectorAll("article")}_scrollToSection(t,e=120){if(t)try{const a=this.querySelector(`#${CSS.escape(t)}`);if(!a)return;a.scrollIntoView(),window.scrollTo(0,window.scrollY-e),this._removeRefFocusedClass(),a.classList.add("refFocused")}catch(t){console.error(t)}}_removeRefFocusedClass(){this.querySelectorAll(".refFocused").forEach((t=>{t.classList.remove("refFocused")}))}_addCommentText(){this.suttaComment&&0!==this._articleElement().length&&"none"!==this.chosenNoteDisplayType&&(Object.entries(this.suttaComment).forEach((([t,e])=>{const a=this.querySelector(`#${CSS.escape(t)} .translation`);a?.appendChild(this._addCommentSpan(e))})),this._initializeFloatingTooltips())}_addCommentSpan(t){const e=document.createElement("span");return e.className="comment",e.innerHTML=t,e}_stripHTML(t){const e=document.createElement("DIV");return e.innerHTML=t,e.textContent||e.innerText||""}_resetCommentSpan(){this.querySelectorAll(".comment").forEach((t=>{t.removeAttribute("style"),t.onmouseover=null,t.onmouseleave=null}))}_addCommentSpanId(){let t=0;this.querySelectorAll("span.comment").forEach((e=>{e.id=`comment_${t}`,t++}))}updated(t){let e=!1;t.has("chosenTextView")&&(e=!0),t.has("paliScript")&&(this._changeScript(),this._updateURLSearchParams()),t.has("isPaliLookupEnabled")&&this._paliLookupStateChanged(),t.has("isChineseLookupEnabled")&&this._chineseLookupStateChanged(),t.has("markup")&&(e=!0),t.has("displayedReferences")&&(e=!0),t.has("chosenNoteDisplayType")&&(e=!0),t.has("showHighlighting")&&(this._showHighlightingChanged(),this._updateURLSearchParams()),t.has("currentStyles")&&(this._isPlusStyle()||this._resetCommentSpan()),t.has("rootTextFirst")&&"linebyline"===this.chosenTextView&&(e=!0),t.has("showIllustrations")&&(e=!0),e&&this._updateView()}_showHighlightingChanged(){this._articleElement().forEach((t=>{this.showHighlighting?t.classList.add("highlight"):t.classList.remove("highlight")}))}_isPlusStyle(){return this.currentStyles===p.f7||this.currentStyles===p.K9||this.currentStyles===p.Kl}_paliLookupStateChanged(){this.isPaliLookupEnabled&&"pli"===this.rootSutta.lang?(this._enablePaliLookup(),this._loadSCBottomSheet()):this._disableLookup()}_chineseLookupStateChanged(){!this.isChineseLookupEnabled||"lzh"!==this.rootSutta.lang&&"lzh"!==this.translatedSutta.lang?this._disableLookup():(this._enableChineseLookup(),this._loadSCBottomSheet())}_disableLookup(){this.querySelector("sc-bottom-sheet")?.hide?.(),this._removeDefineFocusedClass(),this._removeLookupEvent(".root .text .word")}
2560async _loadSCBottomSheet(){if(await Promise.resolve().then(a.bind(a,7329)),this.querySelector("sc-bottom-sheet"))return;const t=document.createElement("sc-bottom-sheet");t.id="bottom_sheet",t.slot="bottom_sheet",this.appendChild(t)}_conditionallyPutIntoSpans(t){this.rootSutta.lang===t&&this.querySelector(".root")&&this._putIntoSpans(".root",t)}_putIntoSpans(t,e){"pli"===e?this._putWordsIntoSpans(t,"word"):"lzh"===e&&this._putGraphsIntoSpans(t,"graph")}_putGraphsIntoSpans(t,e){this._startGeneratingSpans(t,"graph",e)}_updateURLSearchParams(){const t=this?.parentNode?.querySelector("sc-text-bilara");if(!t)return;const{siteLanguage:e,textOptions:a}=n.M.getState(),i=a.noteDisplayType,s=a.segmentedSuttaTextView,{showHighlighting:r}=a,o=a.script,{displayedReferences:l}=a;let[h,d,p,g,f]=["notes","layout","script","highlight","reference"].map(c.DP);h&&d&&p&&g&&f?(this.isTextOptionsMismatchSavedSettings=i!==h?.toLowerCase()||s!==d?.toLowerCase()||r!==("true"===g)||o!==p||l!==f?.split("/"),this.shouldRestoreUserSettings&&(this.isTextOptionsMismatchSavedSettings=!1),h&&!["none","asterisk","sidenotes"].includes(h.toLowerCase())&&(h=i),d&&!["plain","sidebyside","linebyline"].includes(d.toLowerCase())&&(d=s),g&&!["true","false"].includes(g.toLowerCase())&&(g=r),p&&!u.c.find((t=>t.script===p))&&(p=o),f&&0===f.split("/").filter((t=>["main","none"].includes(t.toLowerCase())||m.n.some((e=>e.edition_set===t)))).length&&(f=l)):this.isTextOptionsMismatchSavedSettings=!1;const y=`?${new URLSearchParams({lang:e,layout:this.isTextOptionsMismatchSavedSettings?d:s,reference:this.isTextOptionsMismatchSavedSettings?f:l,notes:this.isTextOptionsMismatchSavedSettings?h:i,highlight:this.isTextOptionsMismatchSavedSettings?g:r,script:this.isTextOptionsMismatchSavedSettings?p:o}).toString()}${window.location.hash}`;window.history.replaceState(null,null,y)}_setTextViewState(){const{textOptions:t}=n.M.getState();this.chosenNoteDisplayType=t.noteDisplayType,this.chosenTextView=t.segmentedSuttaTextView,this.showHighlighting=t.showHighlighting,this.showIllustrations=t.showIllustrations,this.paliScript=t.script,this.paliScriptOptions=u.c.find((t=>t.script===this.paliScript)).postoptions||"null",this.displayedReferences=t.displayedReferences;const[e,a,i,s,r]=["notes","layout","script","highlight","reference"].map(c.DP);if(e||a||i||s||r){if(this.isTextOptionsMismatchSavedSettings=this.chosenNoteDisplayType!==e?.toLowerCase()||this.chosenTextView!==a?.toLowerCase()||this.showHighlighting!==("true"===s)||this.paliScript!==i||this.displayedReferences!==r?.split("/"),this.isTextOptionsMismatchSavedSettings&&(e&&["none","asterisk","sidenotes"].includes(e.toLowerCase())&&(this.chosenNoteDisplayType=e.toLowerCase()),a&&["plain","sidebyside","linebyline"].includes(a.toLowerCase())&&(this.chosenTextView=a.toLowerCase()),s&&["true","false"].includes(s.toLowerCase())&&(this.showHighlighting="true"===s),i&&u.c.find((t=>t.script===i))&&(this.paliScript=i,this.paliScriptOptions=u.c.find((t=>t.script===this.paliScript)).postoptions||"null"),r)){const t=r.split("/").filter((t=>["main","none"].includes(t.toLowerCase())||m.n.some((e=>e.edition_set===t))));t.length>0&&(this.displayedReferences=t)}}else this.isTextOptionsMismatchSavedSettings=!1}_updateTextViewStylesBasedOnState(){if(this.viewCompose=`${this.chosenNoteDisplayType}_${this.chosenTextView}`,!this.bilaraTranslatedSutta&&this.bilaraRootSutta&&("sidenotes"===this.chosenNoteDisplayType?this.viewCompose="sidenotes_root":this.viewCompose="pali"),this.currentStyles=this.mapStyles.get(this.viewCompose)||p.HB,this.displayedReferences)if(this.displayedReferences.includes("none")&&!window.location.href.includes("#"))this.referencesDisplayStyles=p.ik;else{const t=this.displayedReferences.includes("main")||window.location.href.includes("#");this.referencesDisplayStyles=i.qy` 2561 <style> 2562 .reference { 2563 display: inline; 2564 } 2565 2566 .reference a { 2567 display: none; 2568 } 2569 2570 .reference:has(:target) { 2571 display: inline !important; 2572 } 2573 2574 .reference a:target { 2575 display: inline !important; 2576 } 2577 2578 ${t?"\n .reference a.sc,\n .reference a.vns {\n display: inline;\n }\n ":""} 2579 2580 ${this.displayedReferences.map((t=>i.qy` ${` .reference a.${t}`} { display: inline; } `))} 2581 2582 ${this.displayedReferences.includes("pts")?i.qy`.reference a.vnp { display: inline; }`:""} 2583 </style> 2584 `}this.notesDisplayStyles=this.mapNoteDisplayStyles.get(this.chosenNoteDisplayType),"linebyline"===this.chosenTextView&&this.rootTextFirst?this.lineByLineRootTextFirstStyles=p.jf:this.lineByLineRootTextFirstStyles=""}stateChanged(t){super.stateChanged(t),this.chosenTextView!==t.textOptions.segmentedSuttaTextView&&this.shouldRestoreUserSettings&&(this.chosenTextView=t.textOptions.segmentedSuttaTextView),this.paliScript!==t.textOptions.script&&this.shouldRestoreUserSettings&&(this.paliScript=t.textOptions.script,this.paliScriptOptions=u.c.find((t=>t.script===this.paliScript)).postoptions||"null",this.hasScriptBeenChanged=!0),this.isPaliLookupEnabled!==t.textOptions.paliLookupActivated&&(this.isPaliLookupEnabled=t.textOptions.paliLookupActivated),this.isChineseLookupEnabled!==t.textOptions.chineseLookupActivated&&(this.isChineseLookupEnabled=t.textOptions.chineseLookupActivated),this.buildReferences(this.displayedReferences)!==this.buildReferences(t.textOptions.displayedReferences)&&this.shouldRestoreUserSettings&&(this.displayedReferences=Array.from(t.textOptions.displayedReferences)),this.chosenNoteDisplayType!==t.textOptions.noteDisplayType&&this.shouldRestoreUserSettings&&(this.chosenNoteDisplayType=t.textOptions.noteDisplayType),this.showHighlighting!==t.textOptions.showHighlighting&&this.shouldRestoreUserSettings&&(this.showHighlighting=t.textOptions.showHighlighting),this.rootTextFirst!==t.textOptions.rootTextFirst&&(this.rootTextFirst=t.textOptions.rootTextFirst),this.showIllustrations!==t.textOptions.showIllustrations&&(this.showIllustrations=t.textOptions.showIllustrations)}buildReferences(t){return Array.isArray(t)?t.reduce(((t,e)=>t+e),""):""}_prepareNavigation(){const t=this.bilaraTranslatedSutta||this.bilaraRootSutta;if(!t)return void l.I.showToc([]);const e=document.createElement("template");e.innerHTML=this.markup?.trim();let a=Array.from(e.content.querySelectorAll("h2")).map((e=>{const a=e.firstElementChild?e.firstElementChild.id:null;if(t[a])return{link:a,name:this._stripLeadingOrdering(t[a])}}));
2584a=a.filter(Boolean),l.I.showToc(a)}_stripLeadingOrdering(t){return t.replace(/^\d+\./,"").trim()}_addRootText(){this.bilaraRootSutta&&0!==this._articleElement().length&&(this._deleteRootSuttaMarkup(),this._addRootSuttaMarkup(),Object.entries(this.bilaraRootSutta).forEach((([t,e])=>{this._addRootTextToSpan(CSS.escape(t),e)})))}_addTransliteratedRootText(){this.transliteratedRootSutta&&0!==this._articleElement().length&&(this._deleteRootSuttaMarkup(),this._addRootSuttaMarkup(),Object.entries(this.transliteratedRootSutta).forEach((([t,e])=>{this._addTransliteratedRootTextToSpan(CSS.escape(t),e)})))}_addTransliteratedRootTextToSpan(t,e){const a=this.querySelector(`#${t} .root .text`);a&&(a.classList.add(`${this.paliScript.toLowerCase()}-script`),a.innerHTML=e)}_addRootTextToSpan(t,e){const a=this.querySelector(`#${t} .root .text`);a&&(a.innerHTML=e)}_deleteRootSuttaMarkup(){this._articleElement().forEach((t=>{const e=t.querySelectorAll(".root");e&&e.forEach((t=>{t.parentNode.removeChild(t)}))}))}_deleteTranslatedSuttaMarkup(){this._articleElement().forEach((t=>{const e=t.querySelectorAll(".translation");e&&e.forEach((t=>{t.parentNode.removeChild(t)}))}))}_addRootSuttaMarkup(){this.bilaraRootSutta&&0!==this._articleElement().length&&Object.keys(this.bilaraRootSutta).forEach((t=>{this._addRootSuttaMarkupToSpan(CSS.escape(t))}))}_addRootSuttaMarkupToSpan(t){const e=this.querySelector(`#${t}`);e&&e.appendChild(this._addRootSuttaSpan())}_addTranslationSuttaMarkup(){this.bilaraTranslatedSutta&&0!==this._articleElement().length&&Object.keys(this.bilaraTranslatedSutta).forEach((t=>{this._addTranslationSuttaMarkupToSpan(CSS.escape(t))}))}_addTranslationSuttaMarkupToSpan(t){const e=this.querySelector(`#${t}`);e&&e.appendChild(this._addTranslationSuttaSpan())}_addTranslationSuttaSpan(){const t=document.createElement("span");t.className="translation",t.lang=this.translatedSutta.lang;const e=document.createElement("span");return e.className="text",t.appendChild(e),t}_addSCReference(){this.bilaraRootSutta&&0!==this._articleElement().length&&Object.keys(this.bilaraRootSutta).forEach((t=>{const e=this.querySelector(`#${CSS.escape(t)}`);if(e){const a=this._addReferenceSpan();a.appendChild(this._addSCReferenceAnchor(t)),this._prependChild(e,a)}}))}_deleteReference(){this._articleElement().forEach((t=>{t.querySelectorAll(".reference").forEach((t=>{t.parentNode.removeChild(t)}))}))}_deleteSCReference(){this._articleElement().forEach((t=>{t.querySelectorAll(".reference .sc").forEach((t=>{t.parentNode.removeChild(t)}))}))}_prependChild(t,e){return t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e),t}_addSCReferenceAnchor(t){let e=t.substring(t.indexOf(":")+1,t.length),a=e;this.isMultiSutta&&(e=t.replace(":","_"),a=t);const i=document.createElement("a");i.className="sc",i.id=e,i.href=`#${e}`,i.title=this.localize("text:segmentNumber");const s=document.createTextNode(a);return i.appendChild(s),i}_addVariantText(){this.suttaVariant&&0!==this._articleElement().length&&(Object.entries(this.suttaVariant).forEach((([t,e])=>{const a=this.querySelector(`#${CSS.escape(t)} .root`);a&&e&&a.appendChild(this._addVariantSpan(e))})),this._initializeFloatingTooltips())}_addVariantSpan(t){const e=`Variant: ${t}`,a=document.createElement("span");a.className="variant";const i=document.createTextNode(e);return a.appendChild(i),a}_addRootSuttaSpan(){const t=document.createElement("span");t.className="root",t.lang=this.rootSutta.lang,t.setAttribute("translate","no");const e=document.createElement("span");return e.className="text","pli"===this.rootSutta.lang&&(e.lang="la"),t.appendChild(e),t}_addReferenceSpan(){const t=document.createElement("span");return t.className="reference",t}async _addReferenceText(){this.suttaReference&&0!==this._articleElement().length&&(await this._fetchRootEdition(),Object.entries(this.suttaReference).forEach((([t,e])=>{const a=this.querySelector(`#${CSS.escape(t)} .reference`);a&&e&&this._addReferenceAnchor(e,a)})),this._hashChangeHandler())}_addReferenceAnchor(t,e){const a=t.replace(/\s*/g,"").split(",");0!==a.length&&a.forEach((t=>{if(!this.querySelector(`#${CSS.escape(t)}`)){let a=t;const i=document.createElement("a"),s=this._getReferenceInfo(t);a=s?.uid?.length>=3&&"pts"===s?.uid?.substring(0,3)?"pts":s?.uid?.length>=3&&"sya"===s?.uid?.substring(0,3)?"sya":s?.uid?.length>=3&&"csp"===s?.uid?.substring(0,3)?"csp":t.length>=2&&"sc"===t.substring(0,2)?"sc":/^t\d{2,3}\.|^t\d{4}[a-z]\d{2}/.test(t)?"taisho":s?.uid,i.className=a||t,i.title=s?.long_name||t,this._initPtsReferenceAnchor(i,t),e.appendChild(i)}}))}_checkAVIFSupport(){return new Promise((t=>{const e=new Image;e.onload=()=>t(!0),e.onerror=()=>t(!1),e.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdj
2584FDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgABogQEAwgMg8f8D///8WfhwB8+ErK42A="}))}async _addIllustrations(){"sidebyside"!==this.chosenTextView&&this.showIllustrations&&!this.viewCompose.includes("sidenote")?(await a.e(4806).then(a.bind(a,4806)),this.suttaIllustrations&&0!==this._articleElement().length&&(this.suttaIllustrations.forEach((t=>{this._addIllustrationMarkupToSpan(t)})),this._ensureIllustrationsAtEnd())):this.querySelectorAll("sc-text-illustration").forEach((t=>{t.remove()}))}_ensureIllustrationsAtEnd(){this.querySelectorAll("sc-text-illustration").forEach((t=>{const e=t.parentElement;e&&e.lastElementChild!==t&&e.appendChild(t)}))}_addIllustrationMarkupToSpan(t){const e=this.querySelector(`#${CSS.escape(t.segment)}`);e&&!e.querySelector("sc-text-illustration")&&e.appendChild(this._addSCIllustrationElement(t))}_removeIllustrations(){this.querySelectorAll("sc-text-illustration").forEach((t=>{t.remove()}))}_addSCIllustrationElement(t){const e=document.createElement("sc-text-illustration");return e.className="illustration",e.alt=t.alt||"",e.filename=t.filename||"",e.creator=t.creator||"",e.creationDate=t.creation_date||"",e}_initPtsReferenceAnchor(t,e){t.id=e,t.href=`#${e}`;const a=document.createTextNode(e);t.appendChild(a)}_getReferenceInfo(t){for(let e=t.length;e>=0;e--){const a=t.substring(0,e);if("sya"===a)return this.rootEdition.find((t=>"sya-all"===t.uid));if(a){const t=this.rootEdition.find((t=>t.uid===a));if(t)return t}}return{}}_addTranslationText(){this.bilaraTranslatedSutta&&0!==this._articleElement().length&&(this._deleteTranslatedSuttaMarkup(),this._addTranslationSuttaMarkup(),Object.entries(this.bilaraTranslatedSutta).forEach((([t,e])=>{this._addTranslationTextToSpan(CSS.escape(t),e)})))}_addTranslationTextToSpan(t,e){const a=this.querySelector(`#${t} .translation .text`);a&&(a.innerHTML=e)}_putWordsIntoSpans(t,e){this._startGeneratingSpans(t,e)}_startGeneratingSpans(t,e){let a=this.querySelectorAll(t);a=Array.from(a);let i=!0;for(;a.length>0;){const t=a.shift();if(!t)return;i=!1,this._putSegmentIntoSpans(t,e)}i||("word"===e?this.spansForWordsGenerated=!0:"graph"===e&&(this.spansForGraphsGenerated=!0))}_putSegmentIntoSpans(t,e){const a=t.innerHTML,i=document.createElement("div");i.innerHTML=a,this._recurseDomChildren(i,!0,e),t.innerHTML=i.innerHTML.replace(/%spfrnt%/g,'<span class="word">').replace(/%spback%/g,"</span>").replace(/â/g,'</span>â<span class="word">')}_recurseDomChildren(t,e,a){let i;t.childNodes&&(i=t.childNodes,this._loopNodeChildren(i,e,a))}_loopNodeChildren(t,e,a){let i;for(let s=0;s<t.length;s++)i=t[s],this._addSpanToNode(i,a),i.childNodes&&this._recurseDomChildren(i,e,a)}_addSpanToNode(t,e){if(3!==t.nodeType)return;const a=t.data.split(/\s+/g);let i="";for(let t=0;t<a.length;t++)if(a[t])if("word"===e)i+=`%spfrnt%${a[t]}%spback% `;else if("graph"===e){for(const e of a[t])i+=`%spfrnt%${e}%spback%`;i+=" "}t.data=i}_addWordSpanId(t){let e=0;this.querySelectorAll(t).forEach((t=>{t.id=`word_${e}`,e++}))}_addPaliLookupEvent(t){const e=this.querySelectorAll(t),a=Array.from(e);for(const t of a)t.addEventListener("click",this.onPaliWordClick)}_byPassLookupClick(){return n.M.getState().displaySettingMenu||n.M.getState().displaySuttaParallels||n.M.getState().displaySuttaToC||n.M.getState().displaySuttaInfo}onPaliWordClick(t){if(t.currentTarget.getRootNode().querySelector("sc-text-bilara")._byPassLookupClick())return;const e=t.currentTarget.getRootNode().querySelector("sc-text-bilara"),a=e.querySelector("#pali_lookup");e._removeDefineFocusedClass(),e._addDefineFocusedClass(t.currentTarget),e._setSCBottomSheet(t.currentTarget,a)}_addChineseLookupEvent(t){const e=this.querySelectorAll(t),a=Array.from(e);for(const t of a)t.addEventListener("click",this.onChineseWordClick)}onChineseWordClick(t){if(t.currentTarget.getRootNode().querySelector("sc-text-bilara")._byPassLookupClick())return;const e=t.currentTarget.getRootNode().querySelector("sc-text-bilara"),a=e.querySelector("#chinese_lookup");e._removeDefineFocusedClass(),e._addDefineFocusedClass(t.currentTarget),e._setSCBottomSheet(t.currentTarget,a)}_addDefineFocusedClass(t){t.classList.add("spanFocused")}_removeDefineFocusedClass(){this.querySelectorAll(".spanFocused").forEach((t=>{t.classList.remove("spanFocused")}))}_removeLookupEvent(t){const e=this.querySelectorAll(t);Array.from(e).forEach((t=>{t.removeEventListener("click",this.onPaliWordClick),t.removeEventListener("click",this.onChineseWordClick)}))}_setSCBottomSheet(t,e){const a=this.querySelector("sc-bottom-sheet");a.currentTarget=t;let i="";i="chinese_lookup"===e.id?a.getSentenceText()||t.dataset.latin_text||t.textContent:t.dataset.latin_text||t.textContent,a.currentDefine=i;const s=e.lookupWord(i);a.currentDefineDetail=s.html,a.lookup=e,a.show()}async _enablePaliLookup(){if(await a.e(7392).then(a.bind(a,7392)),!this.querySelector("sc-pali-lookup")){const t=document.createElement("sc-pali-lookup");t.id="pali_lookup",t.slot="pali_lookup",this.appendChild(t)}this.spansForWordsGenerated||this._putWordsIntoSpans(".root .text","word"),this._addWordSpanId("span.word"),setTimeout((()=>{this._addPaliLookupEvent(".root .text .word"),this._reloadIllustrations()}),0)}_reloadIllustrations(){this._removeIllustrations(),this._checkAVIFSupport().then((t=>{t&&this._addIllustrations()}))}async _enableChineseLookup(){if(await Promise.resolve().then(a.bind(a,9796)),!this.querySelector("sc-chinese-lookup")){const t=document.createElement("sc-chinese-lookup");t.id="chinese_lookup",t.slot="chinese_lookup",this.appendChild(t)}this.spansForGraphsGenerated||this._conditionallyPutIntoSpans("lzh"),this._addWordSpanId(".root .text .word"),setTimeout((()=>{this._addChineseLookupEvent(".root .text .word"),this._reloadIllustrations()}),0)}_changeScript(){if(!this.rootSutta||"pli"!==this.rootSutta.lang)return;const t=this.querySelectorAll(".root");this.hasScriptBeenChanged&&this._resetScript(),"latin"===this.paliScript?(this._segmentedTextContentElement().classList.add("latin-script"),this._segmentedTextContentElement().querySelector(".original-text[lang='pli-Latn']")||t.forEach((t=>this._setScriptISOCode(t,this.rootSutta.lang))),this.hasScriptBeenChanged=!1):this._checkSelectedScriptValid()&&(this._setScript(),this.hasScriptBeenChanged=!0),this.translatedSutta?this._segmentedTextContentElement().removeAttribute("lang"):this._setScriptISOCode(this._segmentedTextContentElement(),this.rootSutta.lang)}_checkSelectedScriptValid(){return u.c.find((t=>t.script===this.paliScript))}_setScriptISOCode(t,e){"pli"===e&&this.paliScript&&(e+=`-${this.paliScript}`),t.setAttribute("lang",e)}_resetScript(){this._addRootText(),this.spansForWordsGenerated=!1,this._paliLookupStateChanged()}async _scriptTransliterate(t,e){if(!t||!e)return;const a=`${r.Sw}/transliterated_sutta/${t}/${e}/${this.paliScriptOptions||"null"}`;
2584try{this.transliteratedRootSutta=await(await fetch(a)).json()}catch(t){this.lastError=t}}async _fetchRootEdition(){if(!(this.rootEdition.length>0))try{const t=`${r.Sw}/root_edition`;this.rootEdition=await(await fetch(t)).json()}catch(t){this.lastError=t}}_setScript(){"pli"===this.rootSutta.lang&&this._setScriptOfSegments()}async _setScriptOfSegments(){await this._scriptTransliterate(this.suttaId,this._scriptFunctionName()),this._addTransliteratedRootText(),0===this.querySelectorAll(".variant").length&&this._addVariantText()}_scriptFunctionName(){return this.paliScript?this.paliScript.charAt(0).toUpperCase()+this.paliScript.slice(1):"latin"}listenThisSutta(){if(!this.suttaId||!this.language)return;const t=this.translatedSutta?.lang||"en",e=this.translatedSutta?.author_uid||"sujato",a=`https://www.api.sc-voice.net/scv/ebt-site/${this.suttaId}/${t}/${e}`;window.open(a,"_blank")}}customElements.define("sc-text-bilara",S),e()}catch(t){e(t)}}))},9232:function(t,e,a){a.d(e,{b:function(){return i},c:function(){return s}});const i=a(6337).AH` 2585 .phagspatib-script { 2586 font-family: 'BabelStone PhagsPa TibA' !important; 2587 writing-mode: vertical-lr; 2588 line-height: 1.8em; 2589 font-size: 150%; 2590 } 2591 2592 .phagspaseal-script { 2593 font-family: 'BabelStone PhagsPa Seal' !important; 2594 writing-mode: vertical-lr; 2595 line-height: 1.8em; 2596 } 2597 2598 .mongolian-script { 2599 font-family: 'MQG8F02' !important; 2600 writing-mode: vertical-lr; 2601 line-height: 1.8em; 2602 font-size: 135%; 2603 } 2604 2605 .soyombo-script { 2606 font-family: 'Noto Sans Soyombo' !important; 2607 font-size: 130%; 2608 } 2609 2610 .russiancyrillic-script { 2611 font-family: 'Noto Sans Regular' !important; 2612 } 2613 2614 .oriyavedic-script { 2615 font-family: 'Lohit Oriya Vedic' !important; 2616 } 2617 2618 .bengalivedic-script { 2619 font-family: 'Noto Sans Bengali Vedic' !important; 2620 } 2621 2622 .gujarativedic-script { 2623 font-family: 'Noto Sans Gujarati Vedic' !important; 2624 } 2625 2626 .gurmukhivedic-script { 2627 font-family: 'Noto Sans Gurmukhi Vedic' !important; 2628 } 2629 2630 .ariyaka-script { 2631 font-family: 'Ariyaka' !important; 2632 line-height: 1.5em; 2633 } 2634 2635 .tamilold-script { 2636 font-family: 'Mukta Malar Regular' !important; 2637 font-feature-settings: 'ss04', 'kern'; 2638 } 2639 2640 .tamil-script { 2641 font-family: 'Noto Sans Tamil' !important; 2642 } 2643 2644 .tibetandbumed-script { 2645 font-family: 'Tibetan Dbu Med' !important; 2646 line-height: 2.3em; 2647 } 2648 2649 .tibetan-script { 2650 font-family: 'Noto Sans Tibetan' !important; 2651 font-size: 110%; 2652 } 2653 2654 .buhid-script { 2655 font-family: 'Noto Sans Buhid' !important; 2656 } 2657 2658 .rejang-script { 2659 font-family: 'Noto Sans Rejang' !important; 2660 } 2661 2662 .hanunoo-script { 2663 font-family: 'Noto Sans Hanunoo' !important; 2664 } 2665 2666 .saurashtra-script { 2667 font-family: 'Noto Sans Saurashtra' !important; 2668 } 2669 2670 .sorasompeng-script { 2671 font-family: 'Noto Sans SoraSompeng' !important; 2672 } 2673 2674 .khamtishan-script { 2675 font-family: 'Khamti Regular' !important; 2676 } 2677 2678 .warangciti-script { 2679 font-family: 'Noto Sans WarangCiti' !important; 2680 } 2681 2682 .balinese-script { 2683 font-family: 'Noto Serif Bali' !important; 2684 } 2685 2686 .kannada-script { 2687 font-family: 'Noto Sans Kannada' !important; 2688 } 2689 2690 .javanese-script { 2691 font-family: 'Noto Sans Javanese', 'Javanese Text' !important; 2692 } 2693 2694 .avestan-script { 2695 font-family: 'Noto Sans Avestan' !important; 2696 direction: rtl; 2697 } 2698 2699 .buginese-script { 2700 font-family: 'Noto Sans Buginese' !important; 2701 } 2702 2703 .sinhala-script { 2704 font-family: 'Noto Sans Sinhala' !important; 2705 } 2706 2707 .dogra-script { 2708 font-family: 'Noto Serif Dogra' !important; 2709 } 2710 2711 .tagalog-script { 2712 font-family: 'Noto Sans Tagalog' !important; 2713 } 2714 2715 .tagbanwa-script { 2716 font-family: 'Noto Sans Tagbanwa' !important; 2717 } 2718 2719 .sundanese-script { 2720 font-family: 'Noto Sans Sundanese' !important; 2721 } 2722 2723 .cham-script {
2724 font-family: 'Noto Sans Cham' !important; 2725 } 2726 2727 .ipa-script { 2728 font-family: 'Dejavu Sans' !important; 2729 line-height: 1.5em; 2730 } 2731 2732 .gunjalagondi-script { 2733 font-family: 'Noto Sans GunjalaGondi' !important; 2734 } 2735 2736 .masaramgondi-script { 2737 font-family: 'Noto Sans MasaramGondi' !important; 2738 } 2739 2740 .malayalam-script { 2741 font-family: 'Noto Sans Malayalam' !important; 2742 } 2743 2744 .malayalamold-script { 2745 font-family: 'Meera' !important; 2746 font-size: 130%; 2747 line-height: 125%; 2748 } 2749 2750 .chakma-script { 2751 font-family: 'Noto Sans ChakmaPali' !important; 2752 } 2753 2754 .lepcha-script { 2755 font-family: 'Noto Sans Lepcha' !important; 2756 } 2757 2758 .limbu-script { 2759 font-family: 'Noto Sans Limbu' !important; 2760 } 2761 2762 .batakkaro-script { 2763 font-family: 'Noto Sans Batak' !important; 2764 } 2765 2766 .batakmanda-script { 2767 font-family: 'Noto Sans Batak' !important; 2768 } 2769 2770 .batakpakpak-script { 2771 font-family: 'Noto Sans Batak' !important; 2772 } 2773 2774 .bataksima-script { 2775 font-family: 'Noto Sans Batak' !important; 2776 } 2777 2778 .bataktoba-script { 2779 font-family: 'Noto Sans Batak' !important; 2780 } 2781 2782 .telugu-script { 2783 font-family: 'Noto Sans Telugu' !important; 2784 } 2785 2786 .teluguzha-script { 2787 font-family: 'Aazhvaar Telugu' !important; 2788 } 2789 2790 .khmer-script { 2791 font-family: 'Noto Sans Khmer' !important; 2792 } 2793 2794 .meeteimayek-script { 2795 font-family: 'Noto Sans Meetei Mayek' !important; 2796 } 2797 2798 .tolongsiki-script { 2799 font-family: 'kellytolong' !important; 2800 } 2801 2802 .tamilbrahmi-script { 2803 font-family: 'Adinatha Tamil Brahmi' !important; 2804 } 2805 2806 .phagspa-script { 2807 font-family: 'Microsoft PhagsPa', 'Noto Sans PhagsPa' !important; 2808 writing-mode: vertical-lr; 2809 line-height: 1.8em; 2810 } 2811 2812 .urdu-script { 2813 font-family: 'Noto Sans Nastaliq Urdu' !important; 2814 direction: rtl; 2815 } 2816 2817 .kaithi-script { 2818 font-family: 'Noto Sans Kaithi' !important; 2819 } 2820 2821 .kawi-script { 2822 font-family: 'Tantular Kawi' !important; 2823 } 2824 2825 .pallava-script { 2826 font-family: 'Purnawarman' !important; 2827 } 2828 2829 .gujarati-script { 2830 font-family: 'Noto Serif Gujarati' !important; 2831 } 2832 2833 .modi-script { 2834 font-family: 'Noto Sans Modi' !important; 2835 } 2836 2837 .devanagari-script { 2838 font-family: 'Noto Sans Devanagari' !important; 2839 } 2840 2841 .multani-script { 2842 font-family: 'Noto Sans Multani' !important; 2843 } 2844 2845 .hanifirohingya-script { 2846 font-family: 'Noto Sans HanifiRohingya' !important; 2847 direction: rtl; 2848 } 2849 2850 .ahom-script {
2851 font-family: 'Noto Serif Ahom' !important; 2852 } 2853 2854 .tirhuta-script { 2855 font-family: 'MithilaUni' !important; 2856 } 2857 2858 .oldpersian-script { 2859 font-family: 'Noto Sans OldPersian' !important; 2860 } 2861 2862 .takri-script { 2863 font-family: 'Noto Sans Takri' !important; 2864 } 2865 2866 .taitham-script { 2867 font-family: 'PaliTilok' !important; 2868 font-size: 150%; 2869 } 2870 2871 .khomthai { 2872 font-family: 'Patimokkha'; 2873 font-size: 130%; 2874 } 2875 2876 .khomthai-script { 2877 font-family: 'Patimokkha' !important; 2878 font-size: 150%; 2879 } 2880 2881 .taithamlao-script { 2882 font-family: 'Lamphun' !important; 2883 font-size: 150%; 2884 } 2885 2886 .laotham-script { 2887 font-family: 'Lamphun' !important; 2888 font-size: 150%; 2889 } 2890 2891 .sylotinagri-script { 2892 font-family: 'Noto Sans SylotiNagri' !important; 2893 } 2894 2895 .granthagrantamil-script { 2896 font-family: 'e-Grantamil' !important; 2897 font-size: 110%; 2898 line-height: 1.5em; 2899 } 2900 2901 .tamilgrantha-script { 2902 font-family: 'e-Grantamil' !important; 2903 font-size: 110%; 2904 line-height: 1.5em; 2905 } 2906 2907 .tamilextended-script { 2908 font-family: 'Agastya Extended Tamil' !important; 2909 line-height: 1.6em; 2910 } 2911 2912 .tamilextendedserif-script { 2913 font-family: 'Agastya Serif' !important; 2914 line-height: 1.6em; 2915 } 2916 2917 .siddhammukta-script { 2918 font-size: 120%; 2919 font-family: Muktamsiddham; 2920 } 2921 2922 .siddham-script {
2923 font-family: 'Noto Sans Siddham' !important; 2924 } 2925 2926 .grantha-script { 2927 font-family: 'Noto Sans Grantha2' !important; 2928 line-height: 2em; 2929 font-feature-settings: 'ss04', 'ss06'; 2930 } 2931 2932 .granthaserif-script { 2933 font-family: 'Noto Serif Grantha' !important; 2934 font-feature-settings: 'ss04', 'ss06'; 2935 line-height: 2em; 2936 } 2937 2938 .granthalig-script { 2939 font-family: 'Noto Sans Grantha2' !important; 2940 font-feature-settings: 'ss04', 'ss06', 'ss03'; 2941 line-height: 2em; 2942 } 2943 2944 .granthaseriflig-script { 2945 font-family: 'Noto Serif Grantha' !important; 2946 font-feature-settings: 'ss04', 'ss06', 'ss03'; 2947 line-height: 2em; 2948 } 2949 2950 .kharoshthi-script { 2951 font-family: 'Segoe UI Historic', 'Noto Sans Kharoshthi' !important; 2952 direction: rtl; 2953 } 2954 2955 .thaana-script { 2956 direction: rtl; 2957 } 2958 2959 .zanabazarsquare-script { 2960 font-family: 'Noto Sans Zanabazar Square' !important; 2961 font-feature-settings: 'ss01'; 2962 line-height: 3em; 2963 } 2964 2965 .newa-script { 2966 font-family: 'Noto Sans Newa' !important; 2967 } 2968 2969 .sharada-script { 2970 font-family: 'Satisar Sharada' !important; 2971 font-size: 125%; 2972 line-height: 2em; 2973 } 2974 2975 .thainative-script { 2976 font-family: 'Kaccayana Thai' !important; 2977 } 2978 2979 .mahajani-script { 2980 font-family: 'Noto Sans Mahajani' !important; 2981 } 2982 2983 .multani-script { 2984 font-family: 'Noto Sans Multani' !important; 2985 } 2986 2987 .bhaiksuki-script { 2988 font-family: 'Noto Sans Bhaiksuki' !important; 2989 } 2990 2991 .khojki-script { 2992 font-family: 'Noto Sans Khojki' !important; 2993 } 2994 2995 .khudawadi-script { 2996 font-family: 'Noto Sans Khudawadi' !important; 2997 } 2998 2999 .granthapandya-script { 3000 font-family: 'e-Pandya' !important; 3001 } 3002 3003 .vatteluttu-script { 3004 font-family: 'e-Vatteluttu' !important; 3005 } 3006 3007 .brahmi-script { 3008 font-family: 'Segoe UI Historic', 'Noto Sans Brahmi' !important; 3009 } 3010 3011 .siddhamap-script { 3012 font-family: 'ApDevaSiddham' !important; 3013 } 3014 3015 .limbudeva-script { 3016 font-family: 'AnnaPurna' !important; 3017 } 3018 3019 .laopali-script { 3020 font-family: 'Serif Lao Reg' !important; 3021 } 3022 3023 .nepaldevafont-script { 3024 font-family: 'Nepal2' !important; 3025 } 3026 3027 .santali-script { 3028 font-family: 'Noto Sans Ol Chiki' !important; 3029 } 3030 3031 .ranjana-script { 3032 font-family: 'RanjanaUnicode' !important; 3033 } 3034 3035 .ranjanalantsa-script { 3036 font-family: 'JMYZK--LZT Lantsa' !important; 3037 } 3038 3039 .ranjanawartu-script { 3040 font-family: 'JMYZK--WDT Wartu' !important; 3041 } 3042 3043 .taikuen-script { 3044 font-family: 'A Tai Tham KH New' !important; 3045 } 3046 3047 .khuentham-script { 3048 font-family: 'A Tai Tham KH New' !important; 3049 } 3050 3051 .luetham-script { 3052 font-family: 'Pali TaiLue' !important; 3053 } 3054 3055 .wancho-script { 3056 font-family: 'Noto Sans Wancho' !important; 3057 } 3058 3059 .mro-script { 3060 font-family: 'Noto Sans Mro' !important; 3061 } 3062 3063 .marchen-script { 3064 font-family: 'Noto Sans Marchen' !important; 3065 line-height: 2.5em; 3066 } 3067 3068 .arab { 3069 direction: rtl; 3070 } 3071 3072 .arab-fa { 3073 direction: rtl; 3074 } 3075 3076 .elym-script { 3077 font-family: 'Noto Sans Elymaic' !important; 3078 direction: rtl; 3079 } 3080 3081 .hatr-script { 3082 font-family: 'Noto Sans Hatran' !important; 3083 direction: rtl; 3084 } 3085 3086 .hebr-ar-script { 3087 direction: rtl; 3088 } 3089 3090 .armi-script { 3091 font-family: 'Noto Sans ImperialAramaic' !important; 3092 direction: rtl; 3093 } 3094 3095 .phli-script { 3096 font-family: 'Noto Sans InscriptionalPahlav' !important; 3097 direction: rtl; 3098 } 3099 3100 .prti-script { 3101 font-family: 'Noto Sans InscriptionalParthian' !important; 3102 direction: rtl; 3103 } 3104 3105 .makasar-script { 3106 font-family: 'Adn Salapa Jangang' !important; 3107 font-size: 150%; 3108 } 3109 3110 .mani-script { 3111 font-family: 'Noto Sans Manichaean' !important; 3112 direction: rtl; 3113 } 3114 3115 .nbat-script { 3116 font-family: 'Noto Sans Nabataean' !important; 3117 direction: rtl; 3118 } 3119 3120 .nandinagari-script { 3121 font-family: 'Nandinagari Uni' !important; 3122 font-size: 125%; 3123 } 3124 3125 .narb-script {
3126 font-family: 'Noto Sans OldNorthArabian' !important; 3127 direction: rtl; 3128 } 3129 3130 .sogo-script { 3131 font-family: 'Noto Sans OldSogdian' !important; 3132 direction: rtl; 3133 } 3134 3135 .sarb-script { 3136 font-family: 'Noto Sans OldSouthArabian' !important; 3137 direction: rtl; 3138 } 3139 3140 .palm-script { 3141 font-family: 'Noto Sans Palmyrene' !important; 3142 direction: rtl; 3143 } 3144 3145 .phnx-script { 3146 font-family: 'Noto Sans Phoenician' !important; 3147 direction: rtl; 3148 } 3149 3150 .phlp-script { 3151 font-family: 'Noto Sans PsalterPahlavi' !important; 3152 direction: rtl; 3153 } 3154 3155 .samr-script { 3156 font-family: 'Noto Sans Samaritan' !important; 3157 direction: rtl; 3158 } 3159 3160 .shahmukhi-script { 3161 font-family: 'Noto Nastaliq Urdu' !important; 3162 direction: rtl; 3163 } 3164 3165 .sogd-script { 3166 font-family: 'Noto Sans Sogdian' !important; 3167 direction: rtl; 3168 } 3169 3170 .syre-script { 3171 font-family: 'Noto Sans Syriac' !important; 3172 direction: rtl; 3173 } 3174 3175 .syrj-script { 3176 font-family: 'Noto Sans Syriac' !important; 3177 direction: rtl; 3178 } 3179 3180 .syrn-script { 3181 font-family: 'Noto Sans Syriac' !important; 3182 direction: rtl; 3183 } 3184 3185 .ugar-script { 3186 font-family: 'Noto Sans Ugaritic' !important; 3187 } 3188`,s=[{script:"latin",language:"Latin"},{script:"Ahom",language:"Ahom"},{script:"Arab",language:"Arabic"},{script:"Ariyaka",language:"Ariyaka"},{script:"Assamese",language:"Assamese"},{script:"Avestan",language:"Avestan"},{script:"Balinese",language:"Balinese"},{script:"BatakKaro",language:"Batak Karo"},{script:"BatakManda",language:"Batak Mandailing"},{script:"BatakPakpak",language:"Batak Pakpak"},{script:"BatakSima",language:"Batak Simalungun"},{script:"BatakToba",language:"Batak Toba"},{script:"Bengali",language:"Bengali (Bangla)"},{script:"Bhaiksuki",language:"Bhaiksuki"},{script:"Brahmi",language:"Brahmi"},{script:"Buginese",language:"Buginese (Lontara)"},{script:"Buhid",language:"Buhid"},{script:"Burmese",language:"Burmese (Myanmar)"},{script:"Chakma",language:"Chakma"},{script:"Cham",language:"Cham"},{script:"RussianCyrillic",language:"Cyrillic (Russian)"},{script:"Devanagari",language:"Devanagari"},{script:"Dogra",language:"Dogra"},{script:"Elym",language:"Elymaic"},{script:"Ethi",language:"Ethiopic (Abjad)"},{script:"GunjalaGondi",language:"Gondi (Gunjala)"},{script:"MasaramGondi",language:"Gondi (Masaram)"},{script:"Grantha",language:"Grantha"},{script:"GranthaPandya",language:"Grantha (Pandya)"},{script:"Gujarati",language:"Gujarati"},{script:"Hanunoo",language:"Hanunoo"},{script:"Hatr",language:"Hatran"},{script:"Hebrew",language:"Hebrew"},{script:"Hebr-Ar",language:"Hebrew (Judeo-Arabic)"},{script:"Armi",language:"Imperial Aramaic"},{script:"Phli",language:"Inscriptional Pahlavi"},{script:"Prti",language:"Inscriptional Parthian"},{script:"Hiragana",language:"Japanese (Hiragana)"},{script:"Katakana",language:"Japanese (Katakana)"},{script:"Javanese",language:"Javanese"},{script:"Kaithi",language:"Kaithi"},{script:"Kannada",language:"Kannada"},{script:"Kawi",language:"Kawi"},{script:"KhamtiShan",language:"Khamti Shan"},{script:"Kharoshthi",language:"Kharoshthi"},{script:"Khmer",language:"Khmer (Cambodian)"},{script:"Khojki",language:"Khojki"},{script:"KhomThai",language:"Khom Thai"},{script:"Khudawadi",language:"Khudawadi"},{script:"Lao",language:"Lao"},{script:"LaoPali",language:"Lao (Pali)"},{script:"Lepcha",language:"Lepcha"},{script:"Limbu",language:"Limbu"},{script:"Mahajani",language:"Mahajani"},{script:"Makasar",language:"Makasar"},{script:"Malayalam",language:"Malayalam"},{script:"Mani",language:"Manichaean"},{script:"Marchen",language:"Marchen"},{script:"MeeteiMayek",language:"Meetei Mayek (Manipuri)"},{script:"Modi",language:"Modi"},{script:"Mon",language:"Mon"},{script:"Mongolian",language:"Mongolian (Ali Gali)"},{script:"Mro",language:"Mro"},{script:"Multani",language:"Multani"},{script:"Nbat",language:"Nabataean"},{script:"Nandinagari",language:"Nandinagari"},{script:"Newa",language:"Newa (Nepal Bhasa)"},{script:"Narb",language:"Old North Arabian"},{script:"OldPersian",language:"Old Persian"},{script:"Sogo",language:"Old Sogdian"},{script:"Sarb",language:"Old South Arabian"},{script:"Oriya",language:"Oriya"},{script:"Pallava",language:"Pallava"},{script:"Palm",language:"Palmyrene"},{script:"Arab-Fa",language:"Persian"},{script:"PhagsPa",language:"PhagsPa"},{script:"Phnx",language:"Phoenician"},{script:"Phlp",language:"Psalter Pahlavi"},{script:"Gurmukhi",language:"Punjabi (Gurmukhi)"},{script:"Ranjana",language:"Ranjana (Lantsa)"},{script:"Rejang",language:"Rejang"},{script:"HanifiRohingya",language:"Rohingya (Hanifi)"},{script:"BarahaNorth",language:"Roman (Baraha North)"},{script:"BarahaSouth",language:"Roman (Baraha South)"},{script:"RomanColloquial",language:"Roman (Colloquial)"},{script:"PersianDMG",language:"Roman (DMG Persian)"},{script:"HK",language:"Roman (Harvard-Kyoto)"},{script:"IAST",language:"Roman (IAST)"},{script:"IASTPali",language:"Roman (IAST: PÄḷi)"},{script:"IPA",language:"Roman (IPA)"},{script:"ISO",language:"Roman (ISO 15919 Indic)"},{script:"ISOPali",language:"Roman (ISO 15919: PÄḷi)"},{script:"ISO233",language:"Roman (ISO 233 Arabic)"},{script:"ISO259",language:"Roman (ISO 259 Hebrew)"},{script:"Itrans",language:"Roman (ITRANS)"},{script:"IASTLOC",language:"Roman (LoC Burmese)"},{script:"RomanReadable",language:"Roman (Readable)"},{script:"HebrewSBL",language:"Roman (SBL Hebrew)"},{script:"SLP1",language:"Roman (SLP1)"},{script:"Type",language:"Roman (Semitic Typeable)"},{script:"Latn",language:"Roman (Semitic)"},{script:"Titus",language:"Roman (Titus)"},{script:"Velthuis",language:"Roman (Velthuis)"},{script:"WX",language:"Roman (WX)"},{script:"Samr",language:"Samaritan"},{script:"Santali",language:"Santali (Ol Chiki)"},{script:"Saurashtra",language:"Saurashtra"},{script:"Shahmukhi",language:"Shahmukhi"},{script:"Shan",language:"Shan"},{script:"Sharada",language:"Sharada"},{script:"Siddham",language:"Siddham"},{script:"Sinhala",language:"Sinhala (modern)",postoptions:"SinhalaPali, SinhalaConjuncts"},{script:"Sogd",language:"Sogdian"},{script:"SoraSompeng",language:"Sora Sompeng"},{script:"Soyombo",language:"Soyombo"},{script:"Sundanese",language:"Sundanese"},{script:"SylotiNagri",language:"Syloti Nagari"},{script:"Syrn",language:"Syriac (Eastern)"},{script:"Syre",language:"Syriac (Estrangela)"},{script:"Syrj",language:"Syriac (Western)"},{script:"Tagalog",language:"Tagalog"},{script:"Tagbanwa",language:"Tagbanwa"},{script:"TaiLaing",language:"Tai Laing"},{script:"Takri",language:"Takri"},{script:"Tamil",language:"Tamil"},{script:"TamilExtended",language:"Tamil (Extended)"},{script:"TamilBrahmi",language:"Tamil Brahmi"},{script:"Telugu",language:"Telugu"},{script:"Thaana",language:"Thaana (Dhivehi)"},{script:"Thai",language:"Thai"},{script:"TaiTham",language:"Tham (Lanna)"},{script:"LaoTham",language:"Tham (Lao)"},{script:"KhuenTham",language:"Tham (Tai Khuen)"},{script:"LueTham",language:"Tham (Tai Lue)"},{script:"Tibetan",language:"Tibetan"},{script:"Tirhuta",language:"Tirhuta (Maithili)"},{script:"Ugar",language:"Ugar"},{script:"Urdu",language:"Urdu"},{script:"Vatteluttu",language:"Vatteluttu"},{script:"Wancho",language:"Wancho"},{script:"WarangCiti",language:"Warang Citi"},{script:"ZanabazarSquare",language:"Zanabazar Square"}]},9545:function(t,e,a){var i=a(6337),s=a(6781),n=a(5325),r=a(6655);const o=i.AH` 3189 /* styles unique to legacy texts */ 3190 3191 /* sutta title */ 3192 3193 .subheading { 3194 font-style: italic; 3195 } 3196 3197 /*bilingual sutta title*/ 3198 3199 .mirror { 3200 display: table; 3201 3202 margin-right: auto; 3203 margin-left: auto; 3204 } 3205 .mirror > * { 3206 display: table-row; 3207 } 3208 .mirror-left { 3209 display: table-cell; 3210 3211 width: 50%; 3212 padding-right: 1rem; 3213 3214 text-align: right; 3215 3216 border-right: var(--sc-border); 3217 } 3218 .mirror-right { 3219 display: table-cell; 3220 3221 padding-left: 1rem; 3222 3223 text-align: left; 3224 } 3225 .mirror-middle { 3226 position: absolute; 3227 3228 margin-top: 0.2rem; 3229 3230 text-align: right; 3231 } 3232 3233 .text-table td:first-child { 3234 font-weight: inherit; 3235 } 3236 3237 .spanFocused { 3238 color: rgb(34, 33, 32); 3239 background-color: var(--sc-primary-color-light); 3240 } 3241 3242 .verse-line{ 3243 display: block 3244 } 3245`;var l=a(4768),c=(a(9796),a(7329),a(7282)),h=a(3931),d=a(3182),p=a(1404),u=a(7394),g=a(9911),m=a(7518),f=a(3982);class y extends((0,g.J)(i.WF)){static properties={sutta:{type:Object},showParagraphs:{type:Boolean},paragraphs:{type:Array},author:{type:String},error:{type:Object},lang:{type:String},isLoading:{type:Boolean},spansForWordsGenerated:{type:Boolean},spansForGraphsGenerated:{type:Boolean},isChineseLookupEnabled:{type:Boolean},textualInfoClassTitles:{type:Object},classTitles:{type:Object},editionsExpansionData:{type:Object},localizedStringsPath:{type:String},showHighlighting:{type:Boolean},displayedReferences:{type:Array},navItems:{type:Array}};constructor(){super();const t=c.M.getState().textOptions;this.sutta={},this.showParagraphs=!1,this.paragraphs=t.paragraphDescriptions,this.author="",this.lang="",this.isLoading=!1,this.isTextViewHidden=!1,this.spansForWordsGenerated=!1,this.spansForGraphsGenerated=!1,this.isChineseLookupEnabled=t.chineseLookupActivated,this.showHighlighting=t.showHighlighting,this.displayedReferences=t.displayedReferences,this.textualInfoClassTitles={gloss:"Definition of term.",add:"Text added by the editor or translator for clarification",supplied:"Text hypothetically reconstructed by the editor or translator.",supplied2:"Text hypothetically reconstructed by the editor or translator.",expanded:"Text expanded by editor or translator although elided in original.",surplus:"Text present in the source which the editor believes to be superfluous or redundant.",del:"Text deleted by the editor as superfluous","del-scribe":"Text deleted by the scribe as superfluous",corrected:"Corrected reading."},this.classTitles={gap:"Gap in the manuscript.","t-gaiji":"Chinese characters not in Unicode.",term:"Defined term.",pe:"Instructions for expanding text supplied by the editor or translator.",unclear:"Unclear reading.",scribe:"Note of attribution by the scribe of the manuscript.",suppliedmetre:"Metre reconstructed by the editor."},this.editionsExpansionData={ms:"MÅ«lasarvÄstivÄdavinayavastu, part 1-4",dutt:"MÅ«lasarvÄstivÄdavinayavastu, part 1-4, Dutt (1939-1959)",divy:"DivyÄvadÄna (1886)",ms84:"MÅ«lasarvÄstivÄdavinayavastu, part 1-4, (1984)"},this.localizedStringsPath="/localization/elements/interface",this._hashChangeHandler=()=>{setTimeout((()=>{this._scrollToSection(window.location.hash.substring(1))}),0)},this.suttaContent="",this.isTraditionalChinese=!1}createRenderRoot(){return this}render(){return i.qy` 3246 <style> 3247 ${n.D} 3248 ${r.B} 3249 ${o} 3250 ${l.s} 3251 </style> 3252
3253 <main id="simple_text_content" class="html-text-content" ?hidden=${this.isTextViewHidden}> 3254 ${(0,s._)(this.suttaContent)} 3255 </main> 3256 3257 <sc-chinese-lookup id="chinese_lookup"></sc-chinese-lookup> 3258 <sc-bottom-sheet></sc-bottom-sheet> 3259 `}connectedCallback(){super.connectedCallback(),window.addEventListener("hashchange",this._hashChangeHandler),this.addEventListener("click",(()=>{m.I.changeDisplaySettingMenuState(!1)})),this._extractSuttaText()}firstUpdated(){this._setTextViewState(),this._updateView(),this._updateURLSearchParams(),this.scActionItems=document.querySelector("sc-site-layout").querySelector("#action_items"),this.scActionItems?.hideSpeakerButton(),this._showChineseConverterButton()}disconnectedCallback(){window.removeEventListener("hashchange",this._hashChangeHandler)}updated(t){t.has("sutta")&&this._updateView(),t.has("showParagraphs")&&this._computeParagraphs(),t.has("isLoading")&&this._loadingChanged(),t.has("isChineseLookupEnabled")&&this._chineseLookupStateChanged(),t.has("showHighlighting")&&(this._showHighlightingChanged(),this._updateURLSearchParams()),t.has("displayedReferences")&&(this._displayedReferencesChanged(),this._updateURLSearchParams())}_articleElement(){return this.querySelectorAll("article")}_showChineseConverterButton(){m.I.changeDisplayChineseConverterState((0,u.YP)(this.sutta?.lang))}_showHighlightingChanged(){this.showHighlighting?this._articleElement().forEach((t=>{t.classList.add("highlight")})):this._articleElement().forEach((t=>{t.classList.remove("highlight")}))}_displayedReferencesChanged(){this.displayedReferences.includes("main")?this._articleElement().forEach((t=>{t.classList.add("legacy-reference")})):this._articleElement().forEach((t=>{t.classList.remove("legacy-reference")}))}stateChanged(t){super.stateChanged(t);const e=t.textOptions;this.showParagraphs!==e.paragraphsEnabled&&(this.showParagraphs=e.paragraphsEnabled),this.isChineseLookupEnabled!==e.chineseLookupActivated&&(this.isChineseLookupEnabled=e.chineseLookupActivated),this.showHighlighting!==e.showHighlighting&&(this.showHighlighting=e.showHighlighting),this.displayedReferences!==e.displayedReferences&&(this.displayedReferences=e.displayedReferences)}_updateView(){this._setAttributes(),this.spansForWordsGenerated=!1,this.spansForGraphsGenerated=!1,m.I.changeSuttaMetaText(this._computeMeta()),this._loadingChanged(),this._showHighlightingChanged(),this._displayedReferencesChanged(),this._chineseLookupStateChanged(),this.navItems=this._prepareNavigation(),setTimeout((()=>{this._hashChangeHandler()}),100)}_prepareNavigation(){const t=this.sutta?.text;if(!t)return void m.I.showToc([]);const e=document.createElement("template");e.innerHTML=t;let a=Array.from(e.content.querySelectorAll("h2")).map(((t,e)=>({link:e+1,name:t.innerText})));a=a.filter(Boolean),m.I.showToc(a)}_setAttributes(){this.sutta&&(this.author=this.sutta.author,this.lang=this.sutta.lang,this.isTraditionalChinese="lzh"===this.lang||"zh"===this.lang)}_extractSuttaText(){return this.sutta?.text&&(this.suttaContent=this.sutta.text.replace(/<head>((.|\n)*)<\/head>/,"")),""}toggleChineseConvert(){if(!this.sutta?.text)return"";try{const t=this.sutta.text.replace(/<head>((.|\n)*)<\/head>/,""),e=this.isTraditionalChinese?{from:"tw",to:"cn"}:{from:"cn",to:"tw"},a=f.Tq(e);return this.suttaContent=a(t),this.isTraditionalChinese=!this.isTraditionalChinese,this.requestUpdate(),""}catch(t){return console.error("Simplified Chinese to Traditional Chinese conversion failed:",t),"Simplified Chinese to Traditional Chinese conversion failed."}}_computeMeta(){let t="",e=[];this.sutta?.text&&(e=this.sutta.text.match(/<footer>((.|\n)*)<\/footer>/));try{e&&e.length>0&&(t=e[1])}catch(t){console.error(t)}return!t&&this.sutta&&(t=`Sutta Id: ${this.sutta?.uid}\n <br />\n Sutta Title: ${this.sutta?.title}\n <br />\n Author: ${this.author}\n <br/>\n Language: ${this.lang}`),t}_computeParagraphs(){if(this._setTextualInformationVisible(this.showParagraphs),!this.sutta?.uid)return;let t=/^[a-z]+/.exec(this.sutta.uid)[0];"pli"===t&&(t="vi"),"iti"===t&&(t="it"),this.paragraphs&&this.showParagraphs&&this.paragraphs.forEach((e=>{const a=this.querySelector("#simple_text_content").querySelectorAll(`.${e.uid}`);
3259Array.from(a).forEach((a=>{this._shouldDisplayBookIcon(t,a.id)?this._processVolPageInfo(a,t,e):this._addParagraphData(a,e)}))}))}_shouldDisplayBookIcon(t,e){const a="tha"===t||"thi"===t,i=e.includes("2ed"),s=e.startsWith("pts-vp-pli")||e.match(/pts[1-9]/);return!a&&!i&&s}_processVolPageInfo(t,e,a){let i=/[^\d]+/.exec(t.id)[0];const s=t.id.substring(i.length);let[n,r]=s.split(".");if(n.includes("ed")){let t;[t,n]=n.split("ed"),i+=`${t}ed`}let o=`${n}.${r}`;r||(r=n,n="1",o=`${r}`),r=Number(r),n=Number(n),0===n&&(o=`${r}`,n=1),setTimeout((()=>{t.innerHTML=`\n <span class="image-link">\n <span class="${i}"\n title="${a.description}">\n ${o}\n </span>\n <span\n title="${this.localize("text:viewImage")}" class="image-book-link">\n ${h.K.book}\n </span>\n </span>\n `,t.classList.add("image-book-link"),t.classList.add("textual-info-paragraph"),t.addEventListener("click",(()=>{(0,p.w)(this,"show-image",{vol:n,division:e,pageNumber:r})}))}),500)}_addParagraphData(t,e){t.innerHTML=t.id.replace(e.uid,""),t.title=e.description,t.href=`#${t.id}`,t.classList.add("textual-info-paragraph","latin")}_setTextualInformationVisible(t){const e=this.querySelector("#simple_text_content");if(e){t?e.classList.add("infomode"):e.classList.remove("infomode");for(let t in this.classTitles){const a=e.querySelectorAll(`.${t}`);Array.from(a).forEach((e=>e.title=this.classTitles[t]))}for(let a in this.textualInfoClassTitles){const i=e.querySelectorAll(`.${a}`);t?Array.from(i).forEach((t=>t.title=this.textualInfoClassTitles[a])):Array.from(i).forEach((t=>t.title=""))}const a=e.querySelectorAll(".corr");for(let t in a){const e=a[t];e.title&&(e.innerHTML=this._markupCorrComment(e.title,e.innerHTML),e.title="")}}}_loadingChanged(){this.isTextViewHidden=this.isLoading||this._shouldDisplayError()}_shouldDisplayError(){return!this.sutta?.text||this.error}_scrollToSection(t,e=120){if(t)try{let a=null;a=isNaN(t)?this.querySelector(`#${CSS.escape(t)}`):this.querySelector(`h2:nth-of-type(${t})`),a&&(a.scrollIntoView(),window.scrollTo(0,window.scrollY-e))}catch(t){console.error(t)}}_chineseLookupStateChanged(){this.isChineseLookupEnabled?(this.spansForGraphsGenerated||this._conditionallyPutIntoSpans("lzh"),this._addLookupEvent("article p .lookup_element")):this._disableLookup()}_disableLookup(){const t=this.querySelector("sc-bottom-sheet");t&&t.hide?.(),this._removeDefineFocusedClass(),this._removeLookupEvent("article p .word")}_conditionallyPutIntoSpans(t){const e=this.sutta?.lang;e===t&&this.querySelector("article")&&(this._putIntoSpans("article",t),this._addWordSpanId())}_putIntoSpans(t,e){"lzh"===e&&this._putGraphsIntoSpans(t,"graph")}_putGraphsIntoSpans(t,e){this._startGeneratingSpans(t,"graph",e)}_startGeneratingSpans(t,e,a){let i=this.querySelectorAll(t);i=Array.from(i);let s=!0;for(;i.length>0;){const t=i.shift();if(!t)return;s=!1,this._putSegmentIntoSpans(t,e,this)}s||("word"===e?this.spansForWordsGenerated=!0:"graph"===e&&(this.spansForGraphsGenerated=!0))}_putSegmentIntoSpans(t,e,a){const i=t.innerHTML,s=document.createElement("div");s.innerHTML=i,a._recurseDomChildren(s,!0,e),t.innerHTML=s.innerHTML.replace(/%spfrnt%/g,'<span class="word">').replace(/%spback%/g,"</span>").replace(/%spfrnt_l%/g,'<span class="word lookup_element">').replace(/%spback_l%/g,"</span>").replace(/%spfrnt_w%/g,'<span class="whitespace">')}_recurseDomChildren(t,e,a){let i;t.childNodes&&(i=t.childNodes,this._loopNodeChildren(i,e,a))}_loopNodeChildren(t,e,a){let i;for(let s=0;s<t.length;s++)i=t[s],i.classList&&i.classList.contains("image-link")||"graph"===a&&i.classList&&i.classList.contains("latin")||(this._addSpanToNode(i,a),i.childNodes&&this._recurseDomChildren(i,e,a))}_addSpanToNode(t,e){if(3!==t.nodeType)return;let a=t.data.split(/\s+/g),i="";for(let t=0;t<a.length;t++)a[t]&&("word"===e?i+=`%spfrnt_l%${a[t]}%spback_l% `:"graph"===e&&(i=this._insertGraphsIntoMarkups(i,a[t])));t.data=i}_insertGraphsIntoMarkups(t,e){t+="%spfrnt%";for(let a of e)/^\s+$/.test(a)?t+="%spfrnt_w%graph%spback%":'ï¼,!ï¼?ï¼;ï¼:ï¼ï¼()ï¼[]ã ããããï¹ï¹"ãâ§ããããï¹âãã'.includes(a)?t+=`%spback%%spfrnt%${a}%spback%%spfrnt%`:t+=`%spfrnt_l%${a}%spback_l%`;return t.endsWith("%spfrnt%")?t=t.substring(0,t.length-8)+" ":t+="%spback% ",t}_addWordSpanId(){let t=0;this.querySelectorAll("span.lookup_element:not(a span)").forEach((e=>{e.id=`word_${t}`,t++}))}_addLookupEvent(t){const e=this.querySelector("#chinese_lookup"),a=this.querySelectorAll(t);
3259Array.from(a).forEach((t=>{t.onclick=a=>{if(!this.isChineseLookupEnabled)return;const i=this.querySelector("sc-bottom-sheet");i&&(this._removeDefineFocusedClass(),this._addDefineFocusedClass(a.currentTarget),this._setSCBottomSheet(i,t,e,a.currentTarget))}}))}_addDefineFocusedClass(t){t.classList.add("spanFocused")}_removeDefineFocusedClass(){this.querySelectorAll(".spanFocused").forEach((t=>{t.classList.remove("spanFocused")}))}_removeLookupEvent(t){const e=this.querySelectorAll(t);Array.from(e).forEach((t=>{t.onclick=null}))}_setSCBottomSheet(t,e,a,i){t.currentTarget=i;const s=t?.getSentenceText()||e.dataset.latin_text||e.textContent;t.currentDefine=s;const n=a.lookupWord(s);t.currentDefineDetail=n.html,t.lookup=a,t.show()}_updateURLSearchParams(){const t=this?.parentNode?.querySelector("sc-text-legacy");if(!t)return;const{displayedReferences:e,showHighlighting:a}=c.M.getState().textOptions,{siteLanguage:i}=c.M.getState(),s=`?lang=${i}&reference=${e.join("/")}&highlight=${a}${window.location.hash}`;window.history.replaceState(null,null,s)}_setTextViewState(){const t=(0,u.DP)("highlight"),e=(0,u.DP)("reference");if(t&&["true","false"].includes(t.toLowerCase())&&(this.showHighlighting="true"===t,m.I.setShowHighlighting("true"===t)),e){const t=[];fetch(`${d.Sw}/pali_reference_edition`).then((t=>t.json())).then((a=>{const i=e.split("/");for(const e of i)("main"===e.toLowerCase()||"none"===e.toLowerCase()||a.find((t=>t.edition_set===e)))&&t.push(e);t.length>0&&(this.displayedReferences=t,m.I.setDisplayedReferences(t))})).catch((t=>console.error(t)))}}}customElements.define("sc-text-legacy",y)},9796:function(t,e,a){a.r(e),a.d(e,{SCChineseLookup:function(){return o}});var i=a(6337),s=a(7282),n=a(9911),r=a(3182);class o extends((0,n.J)(i.WF)){static properties={loadedLanguage:{type:String},toLang:{type:String},dictData:{type:Object},loadingDict:{type:Boolean},loadingFallbackDictData:{type:Boolean},fallbackDictData:{type:Object}};constructor(){super(),this.loadedLanguage="";const{textOptions:t}=s.M.getState();this.isChineseLookupEnabled=t.chineseLookupActivated,this.toLang=t.chineseLookupTargetLanguage,this.dictData={},this.loadingDict=!0,this.loadFallbackLanguage=!0,this.fallbackDictData={},this.hanziVariants=new Map([["説","說"],["ç¸","ç·£"],["é²","é"]])}firstUpdated(){this.fetchDictionary()}updated(t){super.updated(t),t.has("toLang")&&this._targetLanguageChanged()}stateChanged(t){super.stateChanged(t);const e=t.textOptions.chineseLookupTargetLanguage;this.toLang!==e&&(this.toLang=e),this.isChineseLookupEnabled!==t.textOptions.chineseLookupActivated&&(this.isChineseLookupEnabled=t.textOptions.chineseLookupActivated,this.fetchDictionary())}async fetchDictionary(){this.toLang&&this.isChineseLookupEnabled&&(this.loadingDict=!0,this.loadedLanguage=this.toLang,"en"===this.toLang&&(this.loadingFallbackDictData=!0,this.fallbackDictData=await(await fetch(this._computeUrl(!0))).json(),this.loadingFallbackDictData=!1),this.dictData=await(await fetch(this._computeUrl())).json(),this.loadingDict=!1)}lookupWord(t){const e=[],a=[];let i=[];for(let e=0;e<t.length;e++)for(let a=1;a<=t.length;a++)i.push(t.slice(e,a));i=i.filter((t=>""!==t)),i=i.sort(((t,e)=>e.length-t.length));for(const t of i){const i=this._lookupWord(t);a.includes(t)||(a.push(t),i&&e.push(i))}for(const i of t){const t=this._lookupWord(i);a.includes(i)||(a.push(i),t&&e.push(t))}return{html:e}}_lookupWord(t){if(!this.dictData)return;t=(t=this._variantsReplace(t)).replace(/\u2060/,"");let e=this.dictData?.find?.((e=>e.entry===t));return"object"==typeof e?this._constructDictEntry(t,e):(e=this.fallbackDictData?.find?.((e=>e.entry===t)),"object"==typeof e?this._constructFallbackEntry(t,e):"")}_variantsReplace(t){t=this.hanziVariants.get(t)??t;for(const e of t)this.hanziVariants.has(e)&&(t=t.replace(new RegExp(e,"g"),this.hanziVariants.get(e)));return t}_constructDictEntry(t,e){const a=`http://www.buddhism-dict.net/cgi-bin/xpr-ddb.pl?q=${encodeURI(t)}`;return i.qy` 3260 <dl> 3261 <dt> 3262 <dfn class="entry" lang="pi" translate="no"> 3263 <a href=${a} target="_blank" rel="noopener noreferrer" class="lookup-link"> ${t} </a> 3264 </dfn> 3265 </dt> 3266 3267 ${e.definition?i.qy` 3268 <ol class="definition"> 3269 <li>${e.definition}</li> 3270 </ol> 3271 `:""} 3272 ${e.pronunciation?i.qy` 3273 <ul class="pronunciation"> 3274 <li>${e.pronunciation}</li> 3275 </ul> 3276 `:""} 3277 </dl> 3278 `}_constructFallbackEntry(t,e){const a=`http://www.buddhism-dict.net/cgi-bin/dealt-lookup?q=${encodeURI(t)}`;return i.qy` 3279 <dl> 3280 <dt> 3281 <dfn class="entry" lang="pi" translate="no"> 3282 <a href=${a} target="_blank" rel="noopener noreferrer" class="lookup-link"> ${t} </a> 3283 </dfn> 3284 </dt> 3285 3286 ${e.definition?i.qy` 3287 <ol class="definition"> 3288 <li>${e.definition}</li> 3289 </ol> 3290 `:""} 3291 ${e.pronunciation?i.qy` 3292 <ul class="pronunciation"> 3293 <li>${e.pronunciation}</li> 3294 </ul> 3295 `:""} 3296 </dl> 3297 `}_computeUrl(t){return t=t||!1,`${r.Sw}/dictionaries/lookup?from=lzh&to=${this.toLang}&fallback=${t}`}_targetLanguageChanged(){this.toLang&&void 0!==this.toLang&&this.toLang!==this.loadedLanguage&&this.fetchDictionary()}}customElements.define("sc-chinese-lookup",o)},9881:function(t,e,a){a.a(t,(async function(t,i){try{a.d(e,{GZ:function(){return l},TF:function(){return h},ay:function(){return r},bG:function(){return o},dI:function(){return c}});var s=a(3182),n=a(7282);const r=[];try{const d=await(await fetch(`${s.Sw}/shortcuts`)).json(),{shortcuts:p}=d?.[0]??{};p&&r.push(...p)}catch(u){console.error(u)}const o=new Map;try{const g=await(await fetch(`${s.Sw}/guides`)).json();for(const m of g)o.set(m.text_uid,m.guide_uid)}catch(f){console.error(f)}const l=new Map([["home",{index:0}],["sutta",{index:99}],["staticPage",{index:1}],["searchPage",{index:1}],["languageDetail",{index:2}]]);function c(t){n.M.dispatch({type:"SET_NAVIGATION",navigationArray:t})}function h(t){if(!t)return;const{siteLanguage:e}=n.M.getState(),a=n.M.getState().navigationArray;a.length=1,fetch(`${s.Sw}/navigation_data/${t}?language=${e||"en"}`).then((t=>t.json())).then((t=>{if(t){for(const e of t)a.find((t=>t.uid===e.uid))||a.push(e);c(a)}})).catch((t=>{console.error(t)}))}i()}catch(y){i(y)}}),1)}}]);
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.