metanorma-un 0.3.5 → 0.3.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -53,6 +53,14 @@
53
53
  <optional>
54
54
  <attribute name="alt"/>
55
55
  </optional>
56
+ <optional>
57
+ <attribute name="case">
58
+ <choice>
59
+ <value>capital</value>
60
+ <value>lowercase</value>
61
+ </choice>
62
+ </attribute>
63
+ </optional>
56
64
  <text/>
57
65
  </element>
58
66
  </define>
@@ -129,6 +137,9 @@
129
137
  </choice>
130
138
  </attribute>
131
139
  </optional>
140
+ <attribute name="normative">
141
+ <data type="boolean"/>
142
+ </attribute>
132
143
  <optional>
133
144
  <ref name="section-title"/>
134
145
  </optional>
@@ -305,6 +316,21 @@
305
316
  </define>
306
317
  </include>
307
318
  <!-- end overrides -->
319
+ <define name="TextElement" combine="choice">
320
+ <ref name="concept"/>
321
+ </define>
322
+ <define name="concept">
323
+ <element name="concept">
324
+ <optional>
325
+ <attribute name="term"/>
326
+ </optional>
327
+ <choice>
328
+ <ref name="eref"/>
329
+ <ref name="xref"/>
330
+ <ref name="termref"/>
331
+ </choice>
332
+ </element>
333
+ </define>
308
334
  <define name="BasicBlock" combine="choice">
309
335
  <choice>
310
336
  <ref name="requirement"/>
@@ -884,7 +910,15 @@
884
910
  <attribute name="id">
885
911
  <data type="ID"/>
886
912
  </attribute>
887
- <ref name="paragraph"/>
913
+ <oneOrMore>
914
+ <choice>
915
+ <ref name="paragraph"/>
916
+ <ref name="ul"/>
917
+ <ref name="ol"/>
918
+ <ref name="dl"/>
919
+ <ref name="formula"/>
920
+ </choice>
921
+ </oneOrMore>
888
922
  </element>
889
923
  </define>
890
924
  <define name="termexample">
@@ -911,7 +945,10 @@
911
945
  </define>
912
946
  <define name="origin">
913
947
  <element name="origin">
914
- <ref name="erefType"/>
948
+ <choice>
949
+ <ref name="erefType"/>
950
+ <ref name="termref"/>
951
+ </choice>
915
952
  </element>
916
953
  </define>
917
954
  <define name="modification">
@@ -919,6 +956,15 @@
919
956
  <ref name="paragraph"/>
920
957
  </element>
921
958
  </define>
959
+ <define name="termref">
960
+ <element name="termref">
961
+ <attribute name="base"/>
962
+ <attribute name="target"/>
963
+ <optional>
964
+ <text/>
965
+ </optional>
966
+ </element>
967
+ </define>
922
968
  <define name="structuredidentifier">
923
969
  <element name="structuredidentifier">
924
970
  <optional>
@@ -107,7 +107,9 @@
107
107
  <zeroOrMore>
108
108
  <ref name="submissionlanguage"/>
109
109
  </zeroOrMore>
110
- <ref name="editorialgroup"/>
110
+ <optional>
111
+ <ref name="editorialgroup"/>
112
+ </optional>
111
113
  <zeroOrMore>
112
114
  <ref name="ics"/>
113
115
  </zeroOrMore>
@@ -136,6 +138,109 @@
136
138
  <ref name="Basic-Section"/>
137
139
  </element>
138
140
  </define>
141
+ <define name="Clause-Section">
142
+ <optional>
143
+ <attribute name="id">
144
+ <data type="ID"/>
145
+ </attribute>
146
+ </optional>
147
+ <optional>
148
+ <attribute name="language"/>
149
+ </optional>
150
+ <optional>
151
+ <attribute name="script"/>
152
+ </optional>
153
+ <optional>
154
+ <attribute name="inline-header">
155
+ <data type="boolean"/>
156
+ </attribute>
157
+ </optional>
158
+ <optional>
159
+ <attribute name="obligation">
160
+ <choice>
161
+ <value>normative</value>
162
+ <value>informative</value>
163
+ </choice>
164
+ </attribute>
165
+ </optional>
166
+ <optional>
167
+ <attribute name="unnumbered">
168
+ <data type="boolean"/>
169
+ </attribute>
170
+ </optional>
171
+ <optional>
172
+ <ref name="section-title"/>
173
+ </optional>
174
+ <group>
175
+ <group>
176
+ <zeroOrMore>
177
+ <ref name="BasicBlock"/>
178
+ </zeroOrMore>
179
+ <zeroOrMore>
180
+ <ref name="note"/>
181
+ </zeroOrMore>
182
+ </group>
183
+ <zeroOrMore>
184
+ <choice>
185
+ <ref name="clause-subsection"/>
186
+ <ref name="terms"/>
187
+ <ref name="definitions"/>
188
+ </choice>
189
+ </zeroOrMore>
190
+ </group>
191
+ </define>
192
+ <define name="Annex-Section">
193
+ <optional>
194
+ <attribute name="id">
195
+ <data type="ID"/>
196
+ </attribute>
197
+ </optional>
198
+ <optional>
199
+ <attribute name="language"/>
200
+ </optional>
201
+ <optional>
202
+ <attribute name="script"/>
203
+ </optional>
204
+ <optional>
205
+ <attribute name="inline-header">
206
+ <data type="boolean"/>
207
+ </attribute>
208
+ </optional>
209
+ <optional>
210
+ <attribute name="obligation">
211
+ <choice>
212
+ <value>normative</value>
213
+ <value>informative</value>
214
+ </choice>
215
+ </attribute>
216
+ </optional>
217
+ <optional>
218
+ <attribute name="unnumbered">
219
+ <data type="boolean"/>
220
+ </attribute>
221
+ </optional>
222
+ <optional>
223
+ <ref name="section-title"/>
224
+ </optional>
225
+ <group>
226
+ <group>
227
+ <zeroOrMore>
228
+ <ref name="BasicBlock"/>
229
+ </zeroOrMore>
230
+ <zeroOrMore>
231
+ <ref name="note"/>
232
+ </zeroOrMore>
233
+ </group>
234
+ <zeroOrMore>
235
+ <choice>
236
+ <ref name="annex-subsection"/>
237
+ <ref name="terms"/>
238
+ <ref name="definitions"/>
239
+ <ref name="references"/>
240
+ </choice>
241
+ </zeroOrMore>
242
+ </group>
243
+ </define>
139
244
  </include>
140
245
  <define name="session">
141
246
  <element name="session">
@@ -221,6 +326,7 @@
221
326
  <value>general</value>
222
327
  <value>limited</value>
223
328
  <value>restricted</value>
329
+ <value>provisional</value>
224
330
  </choice>
225
331
  </element>
226
332
  </define>
@@ -1,6 +1,6 @@
1
1
  require_relative "metadata"
2
+ require_relative "xref"
2
3
  require "fileutils"
3
- require "roman-numerals"
4
4
 
5
5
  module IsoDoc
6
6
  module UN
@@ -30,175 +30,6 @@ module IsoDoc
30
30
  File.join(File.dirname(__FILE__), loc)
31
31
  end
32
32
 
33
- MIDDLE_CLAUSE = "//clause[parent::sections]".freeze
34
-
35
- def initial_anchor_names(d)
36
- preface_names(d.at(ns("//preface/abstract")))
37
- preface_names(d.at(ns("//foreword")))
38
- preface_names(d.at(ns("//introduction")))
39
- d.xpath(ns("//preface/clause")).each do |c|
40
- preface_names(c)
41
- end
42
- preface_names(d.at(ns("//acknowledgements")))
43
- sequential_asset_names(
44
- d.xpath(ns("//preface/abstract | //foreword | //introduction | "\
45
- "//preface/clause | //acknowledgements")))
46
- middle_section_asset_names(d)
47
- clause_names(d, 0)
48
- termnote_anchor_names(d)
49
- termexample_anchor_names(d)
50
- end
51
-
52
- def clause_names(docxml, sect_num)
53
- q = "//clause[parent::sections]"
54
- @paranumber = 0
55
- docxml.xpath(ns(q)).each_with_index do |c, i|
56
- section_names(c, (i + sect_num), 1)
57
- end
58
- end
59
-
60
- def levelnumber(num, lvl)
61
- case lvl % 3
62
- when 1 then RomanNumerals.to_roman(num)
63
- when 2 then ("A".ord + num - 1).chr
64
- when 0 then num.to_s
65
- end
66
- end
67
-
68
- def annex_levelnum(num, lvl)
69
- case lvl % 3
70
- when 0 then RomanNumerals.to_roman(num)
71
- when 1 then ("A".ord + num - 1).chr
72
- when 2 then num.to_s
73
- end
74
- end
75
-
76
- NONTERMINAL =
77
- "./clause | ./term | ./terms | ./definitions | ./references".freeze
78
-
79
- def leaf_section?(clause)
80
- !clause.at(ns(NONTERMINAL)) &&
81
- !%w(definitions annex terms).include?(clause.name) &&
82
- clause.at(ns("./p | ./bibitem"))
83
- end
84
-
85
- def label_leaf_section(clause, lvl)
86
- @paranumber += 1
87
- @anchors[clause["id"]] = {label: @paranumber.to_s,
88
- xref: "paragraph #{@paranumber}",
89
- level: lvl, type: "paragraph" }
90
- end
91
-
92
- def label_annex_leaf_section(clause, num, lvl)
93
- @paranumber += 1
94
- @anchors[clause["id"]] = {label: @paranumber.to_s,
95
- xref: "paragraph #{num}.#{@paranumber}",
96
- level: lvl, type: "paragraph" }
97
- end
98
-
99
- def section_names(clause, num, lvl)
100
- return num if clause.nil?
101
- leaf_section?(clause) and label_leaf_section(clause, lvl) and return
102
- num = num + 1
103
- lbl = levelnumber(num, 1)
104
- @anchors[clause["id"]] = { label: lbl, level: lvl, type: "clause",
105
- xref: l10n("#{@clause_lbl} #{lbl}") }
106
- i = 1
107
- clause.xpath(ns(NONTERMINAL)).each do |c|
108
- section_names1(c, "#{lbl}.#{levelnumber(i, lvl + 1)}", lvl + 1)
109
- i += 1 if !leaf_section?(c)
110
- end
111
- num
112
- end
113
-
114
- def section_names1(clause, num, level)
115
- leaf_section?(clause) and label_leaf_section(clause, level) and return
116
- /\.(?<leafnum>[^.]+$)/ =~ num
117
- @anchors[clause["id"]] = { label: leafnum, level: level, type: "clause",
118
- xref: l10n("#{@clause_lbl} #{num}") }
119
- i = 1
120
- clause.xpath(ns(NONTERMINAL)).each do |c|
121
- section_names1(c, "#{num}.#{levelnumber(i, level + 1)}", level + 1)
122
- i += 1 if !leaf_section?(c)
123
- end
124
- end
125
-
126
- def annex_name_lbl(clause, num)
127
- l10n("<b>#{@annex_lbl} #{num}</b>")
128
- end
129
-
130
- def annex_names(clause, num)
131
- hierarchical_asset_names(clause, num)
132
- leaf_section?(clause) and
133
- label_annex_leaf_section(clause, num, 1) and return
134
- @anchors[clause["id"]] = { label: annex_name_lbl(clause, num),
135
- type: "clause",
136
- xref: "#{@annex_lbl} #{num}", level: 1 }
137
- i = 1
138
- clause.xpath(ns("./clause")).each do |c|
139
- annex_names1(c, "#{num}.#{annex_levelnum(i, 2)}", 2)
140
- i += 1 if !leaf_section?(c)
141
- end
142
- end
143
-
144
- def annex_names1(clause, num, level)
145
- leaf_section?(clause) and
146
- label_annex_leaf_section(clause, num, level) and return
147
- /\.(?<leafnum>[^.]+$)/ =~ num
148
- @anchors[clause["id"]] = { label: leafnum, xref: "#{@annex_lbl} #{num}",
149
- level: level, type: "clause" }
150
- i = 1
151
- clause.xpath(ns("./clause | ./references")).each do |c|
152
- annex_names1(c, "#{num}.#{annex_levelnum(i, level + 1)}", level + 1)
153
- i += 1 if !leaf_section?(c)
154
- end
155
- end
156
-
157
- def back_anchor_names(docxml)
158
- docxml.xpath(ns("//annex")).each_with_index do |c, i|
159
- @paranumber = 0
160
- annex_names(c, RomanNumerals.to_roman(i + 1))
161
- end
162
- docxml.xpath(ns("//bibliography/clause |"\
163
- "//bibliography/references")).each do |b|
164
- preface_names(b)
165
- end
166
- docxml.xpath(ns("//bibitem[not(ancestor::bibitem)]")).each do |ref|
167
- reference_names(ref)
168
- end
169
- end
170
-
171
- def sequential_admonition_names(clause)
172
- i = 0
173
- clause.xpath(ns(".//admonition")).each do |t|
174
- i += 1 unless t["unnumbered"]
175
- next if t["id"].nil? || t["id"].empty?
176
- @anchors[t["id"]] = anchor_struct(i.to_s, nil, @admonition_lbl,
177
- "box", t["unnumbered"])
178
- end
179
- end
180
-
181
- def hierarchical_admonition_names(clause, num)
182
- i = 0
183
- clause.xpath(ns(".//admonition")).each do |t|
184
- i += 1 unless t["unnumbered"]
185
- next if t["id"].nil? || t["id"].empty?
186
- @anchors[t["id"]] =
187
- anchor_struct("#{num}.#{i}", nil, @admonition_lbl, "box",
188
- t["unnumbered"])
189
- end
190
- end
191
-
192
- def sequential_asset_names(clause)
193
- super
194
- sequential_admonition_names(clause)
195
- end
196
-
197
- def hierarchical_asset_names(clause, num)
198
- super
199
- hierarchical_admonition_names(clause, num)
200
- end
201
-
202
33
  def admonition_name_parse(node, div, name)
203
34
  div.p **{ class: "AdmonitionTitle", style: "text-align:center;" } do |p|
204
35
  lbl = anchor(node['id'], :label)
@@ -138,7 +138,11 @@ nav {
138
138
  */
139
139
 
140
140
  .document-type-band {
141
- @include docBand(2, 150, 180px);
141
+ @include docBand($order: 2, $offset: 180px);
142
+
143
+ .document-type {
144
+ top: 20px;
145
+ }
142
146
  }
143
147
 
144
148
  .document-stage-band {
@@ -1,24 +1,8 @@
1
1
  <script>
2
- //TOC generation
3
- $('#toc').toc({
4
- 'selectors': toclevel(), //elements to use as headings
5
- 'container': 'main', //element to find all selectors in
6
- 'smoothScrolling': true, //enable or disable smooth scrolling on click
7
- 'prefix': 'toc', //prefix for anchor tags and class names
8
- 'onHighlight': function(el) {}, //called when a new section is highlighted
9
- 'highlightOnScroll': true, //add class to heading that is currently in focus
10
- 'highlightOffset': 100, //offset to trigger the next headline
11
- 'anchorName': function(i, heading, prefix) { //custom function for anchor name
12
- return prefix+i;
13
- },
14
- 'headerText': function(i, heading, $heading) { //custom function building the header-item text
15
- return $heading.text();
16
- },
17
- 'itemClass': function(i, heading, $heading, prefix) { // custom function for item class
18
- return $heading[0].tagName.toLowerCase();
19
- }
20
- });
21
-
2
+ $("#toc").on('click', 'li', function(e) {
3
+ $(this).parent().find('li.toc-active').removeClass('toc-active');
4
+ $(this).addClass('toc-active');
5
+ });
22
6
  </script>
23
7
 
24
8
  <script>
@@ -58,13 +42,16 @@ $('#toggle').on('click', function(){
58
42
  </script>
59
43
 
60
44
  <script>
61
- /**
62
- * AnchorJS - v4.1.0 - 2017-09-20
63
- * https://github.com/bryanbraun/anchorjs
64
- * Copyright (c) 2017 Bryan Braun; Licensed MIT
65
- */
66
- !function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(this,function(){"use strict";return function(A){function e(A){A.icon=A.hasOwnProperty("icon")?A.icon:"",A.visible=A.hasOwnProperty("visible")?A.visible:"hover",A.placement=A.hasOwnProperty("placement")?A.placement:"right",A.ariaLabel=A.hasOwnProperty("ariaLabel")?A.ariaLabel:"Anchor",A.class=A.hasOwnProperty("class")?A.class:"",A.truncate=A.hasOwnProperty("truncate")?Math.floor(A.truncate):64}function t(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new Error("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}function i(){if(null===document.head.querySelector("style.anchorjs")){var A,e=document.createElement("style");e.className="anchorjs",e.appendChild(document.createTextNode("")),void 0===(A=document.head.querySelector('[rel="stylesheet"], style'))?document.head.appendChild(e):document.head.insertBefore(e,A),e.sheet.insertRule(" .anchorjs-link { opacity: 0; text-decoration: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }",e.sheet.cssRules.length),e.sheet.insertRule(" *:hover > .anchorjs-link, .anchorjs-link:focus { opacity: 1; }",e.sheet.cssRules.length),e.sheet.insertRule(" [data-anchorjs-icon]::after { content: attr(data-anchorjs-icon); }",e.sheet.cssRules.length),e.sheet.insertRule(' @font-face { font-family: "anchorjs-icons"; src: url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype"); }',e.sheet.cssRules.length)}}this.options=A||{},this.elements=[],e(this.options),this.isTouchDevice=function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)},this.add=function(A){var n,o,s,a,r,c,h,l,u,d,f,p=[];if(e(this.options),"touch"===(f=this.options.visible)&&(f=this.isTouchDevice()?"always":"hover"),A||(A="h2, h3, h4, h5, h6"),0===(n=t(A)).length)return this;for(i(),o=document.querySelectorAll("[id]"),s=[].map.call(o,function(A){return A.id}),r=0;r<n.length;r++)if(this.hasAnchorJSLink(n[r]))p.push(r);else{if(n[r].hasAttribute("id"))a=n[r].getAttribute("id");else if(n[r].hasAttribute("data-anchor-id"))a=n[r].getAttribute("data-anchor-id");else{u=l=this.urlify(n[r].textContent),h=0;do{void 0!==c&&(u=l+"-"+h),c=s.indexOf(u),h+=1}while(-1!==c);c=void 0,s.push(u),n[r].setAttribute("id",u),a=u}a.replace(/-/g," "),(d=document.createElement("a")).className="anchorjs-link "+this.options.class,d.href="#"+a,d.setAttribute("aria-label",this.options.ariaLabel),d.setAttribute("data-anchorjs-icon",this.options.icon),"always"===f&&(d.style.opacity="1"),""===this.options.icon&&(d.style.font="1em/1 anchorjs-icons","left"===this.options.placement&&(d.style.lineHeight="inherit")),"left"===this.options.placement?(d.style.position="absolute",d.style.marginLeft="-1em",d.style.paddingRight="0.5em",n[r].insertBefore(d,n[r].firstChild)):(d.style.paddingLeft="0.375em",n[r].appendChild(d))}for(r=0;r<p.length;r++)n.splice(p[r]-r,1);return this.elements=this.elements.concat(n),this},this.remove=function(A){for(var e,i,n=t(A),o=0;o<n.length;o++)(i=n[o].querySelector(".anchorjs-link"))&&(-1!==(e=this.elements.indexOf(n[o]))&&this.elements.splice(e,1),n[o].removeChild(i));return this},this.removeAll=function(){this.remove(this.elements)},this.urlify=function(A){var t=/[& +$,:;=?@"#{}|^~[`%!'<>\]\.\/\(\)\*\\]/g;return this.options.truncate||e(this.options),A.trim().replace(/\'/gi,"").replace(t,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&(" "+A.firstChild.className+" ").indexOf(" anchorjs-link ")>-1,t=A.lastChild&&(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ")>-1;return e||t||!1}}}); </script>
67
-
45
+ // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
46
+ //
47
+ // AnchorJS - v4.2.2 - 2020-04-20
48
+ // https://www.bryanbraun.com/anchorjs/
49
+ // Copyright (c) 2020 Bryan Braun; Licensed MIT
50
+ //
51
+ // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
52
+ !function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(this,function(){"use strict";return function(A){function f(A){A.icon=A.hasOwnProperty("icon")?A.icon:"",A.visible=A.hasOwnProperty("visible")?A.visible:"hover",A.placement=A.hasOwnProperty("placement")?A.placement:"right",A.ariaLabel=A.hasOwnProperty("ariaLabel")?A.ariaLabel:"Anchor",A.class=A.hasOwnProperty("class")?A.class:"",A.base=A.hasOwnProperty("base")?A.base:"",A.truncate=A.hasOwnProperty("truncate")?Math.floor(A.truncate):64,A.titleText=A.hasOwnProperty("titleText")?A.titleText:""}function p(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new Error("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],f(this.options),this.isTouchDevice=function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)},this.add=function(A){var e,t,i,n,o,s,a,r,c,h,l,u,d=[];if(f(this.options),"touch"===(l=this.options.visible)&&(l=this.isTouchDevice()?"always":"hover"),0===(e=p(A=A||"h2, h3, h4, h5, h6")).length)return this;for(!function(){if(null!==document.head.querySelector("style.anchorjs"))return;var A,e=document.createElement("style");e.className="anchorjs",e.appendChild(document.createTextNode("")),void 0===(A=document.head.querySelector('[rel="stylesheet"],style'))?document.head.appendChild(e):document.head.insertBefore(e,A);e.sheet.insertRule(".anchorjs-link{opacity:0;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}",e.sheet.cssRules.length),e.sheet.insertRule(":hover>.anchorjs-link,.anchorjs-link:focus{opacity:1}",e.sheet.cssRules.length),e.sheet.insertRule("[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon)}",e.sheet.cssRules.length),e.sheet.insertRule('@font-face{font-family:anchorjs-icons;src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype")}',e.sheet.cssRules.length)}(),t=document.querySelectorAll("[id]"),i=[].map.call(t,function(A){return A.id}),o=0;o<e.length;o++)if(this.hasAnchorJSLink(e[o]))d.push(o);else{if(e[o].hasAttribute("id"))n=e[o].getAttribute("id");else if(e[o].hasAttribute("data-anchor-id"))n=e[o].getAttribute("data-anchor-id");else{for(c=r=this.urlify(e[o].textContent),a=0;void 0!==s&&(c=r+"-"+a),a+=1,-1!==(s=i.indexOf(c)););s=void 0,i.push(c),e[o].setAttribute("id",c),n=c}(h=document.createElement("a")).className="anchorjs-link "+this.options.class,h.setAttribute("aria-label",this.options.ariaLabel),h.setAttribute("data-anchorjs-icon",this.options.icon),this.options.titleText&&(h.title=this.options.titleText),u=document.querySelector("base")?window.location.pathname+window.location.search:"",u=this.options.base||u,h.href=u+"#"+n,"always"===l&&(h.style.opacity="1"),""===this.options.icon&&(h.style.font="1em/1 anchorjs-icons","left"===this.options.placement&&(h.style.lineHeight="inherit")),"left"===this.options.placement?(h.style.position="absolute",h.style.marginLeft="-1em",h.style.paddingRight="0.5em",e[o].insertBefore(h,e[o].firstChild)):(h.style.paddingLeft="0.375em",e[o].appendChild(h))}for(o=0;o<d.length;o++)e.splice(d[o]-o,1);return this.elements=this.elements.concat(e),this},this.remove=function(A){for(var e,t,i=p(A),n=0;n<i.length;n++)(t=i[n].querySelector(".anchorjs-link"))&&(-1!==(e=this.elements.indexOf(i[n]))&&this.elements.splice(e,1),i[n].removeChild(t));return this},this.removeAll=function(){this.remove(this.elements)},this.urlify=function(A){return this.options.truncate||f(this.options),A.trim().replace(/\'/gi,"").replace(/[& +$,:;=?@"#{}|^~[`%!'<>\]\.\/\(\)\*\\\n\t\b\v]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&-1<(" "+A.firstChild.className+" ").indexOf(" anchorjs-link "),t=A.lastChild&&-1<(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ");return e||t||!1}}});
53
+ // @license-end
54
+ </script>
68
55
  <script>
69
56
  /*
70
57
  $('document').ready(function() {