@citestyle/styles 0.0.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -60
- package/ama.js +1139 -0
- package/apa.js +3707 -0
- package/chicago-author-date.js +6125 -0
- package/harvard.js +1235 -0
- package/ieee.js +1316 -0
- package/mla.js +2349 -0
- package/nature.js +1035 -0
- package/package.json +30 -5
- package/science.js +1070 -0
- package/types.d.ts +5 -1
- package/vancouver.js +993 -0
package/ieee.js
ADDED
|
@@ -0,0 +1,1316 @@
|
|
|
1
|
+
// Generated by @citestyle/compiler — do not edit
|
|
2
|
+
// Source: IEEE Reference Guide version 11.29.2023
|
|
3
|
+
import { formatNames, formatDate, escapeHtml, stripFormatting, toHtml, titleCase, sentenceCase, capitalize, applyTextCase, stripNocaseSpans, ordinal, roman, pageRange } from '@citestyle/core'
|
|
4
|
+
|
|
5
|
+
export const meta = {
|
|
6
|
+
"id": "ieee",
|
|
7
|
+
"title": "IEEE Reference Guide version 11.29.2023",
|
|
8
|
+
"class": "in-text",
|
|
9
|
+
"version": "1.0",
|
|
10
|
+
"compiledWith": "@citestyle/compiler@0.1.0",
|
|
11
|
+
"citationLayoutDelimiter": ", "
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const T = {
|
|
15
|
+
"accessed": "accessed",
|
|
16
|
+
"advance-online-publication": "advance online publication",
|
|
17
|
+
"album": "album",
|
|
18
|
+
"and": "and",
|
|
19
|
+
"and others": "and others",
|
|
20
|
+
"anonymous": "anonymous",
|
|
21
|
+
"at": "at",
|
|
22
|
+
"audio-recording": "audio recording",
|
|
23
|
+
"available at": "available at",
|
|
24
|
+
"by": "by",
|
|
25
|
+
"circa": "circa",
|
|
26
|
+
"cited": "cited",
|
|
27
|
+
"et-al": "et al.",
|
|
28
|
+
"film": "film",
|
|
29
|
+
"forthcoming": "forthcoming",
|
|
30
|
+
"from": "from",
|
|
31
|
+
"henceforth": "henceforth",
|
|
32
|
+
"ibid": "ibid.",
|
|
33
|
+
"in": "in",
|
|
34
|
+
"in press": "in press",
|
|
35
|
+
"internet": "internet",
|
|
36
|
+
"letter": "letter",
|
|
37
|
+
"loc-cit": "loc. cit.",
|
|
38
|
+
"no date": "no date",
|
|
39
|
+
"no-place": "no place",
|
|
40
|
+
"no-publisher": "no publisher",
|
|
41
|
+
"on": "on",
|
|
42
|
+
"online": "online",
|
|
43
|
+
"op-cit": "op. cit.",
|
|
44
|
+
"original-work-published": "original work published",
|
|
45
|
+
"personal-communication": "personal communication",
|
|
46
|
+
"podcast": "podcast",
|
|
47
|
+
"podcast-episode": "podcast episode",
|
|
48
|
+
"preprint": "preprint",
|
|
49
|
+
"presented at": "presented at the",
|
|
50
|
+
"radio-broadcast": "radio broadcast",
|
|
51
|
+
"radio-series": "radio series",
|
|
52
|
+
"radio-series-episode": "radio series episode",
|
|
53
|
+
"reference": {
|
|
54
|
+
"single": "reference",
|
|
55
|
+
"multiple": "references"
|
|
56
|
+
},
|
|
57
|
+
"retrieved": "retrieved",
|
|
58
|
+
"review-of": "review of",
|
|
59
|
+
"scale": "scale",
|
|
60
|
+
"special-issue": "special issue",
|
|
61
|
+
"special-section": "special section",
|
|
62
|
+
"television-broadcast": "television broadcast",
|
|
63
|
+
"television-series": "television series",
|
|
64
|
+
"television-series-episode": "television series episode",
|
|
65
|
+
"video": "video",
|
|
66
|
+
"working-paper": "working paper",
|
|
67
|
+
"advance-online-publication:short": "adv. online pub.",
|
|
68
|
+
"anonymous:short": "anon.",
|
|
69
|
+
"audio-recording:short": "au. rec.",
|
|
70
|
+
"available at:short": "avail. at",
|
|
71
|
+
"circa:short": "c.",
|
|
72
|
+
"cited:short": "cit.",
|
|
73
|
+
"film:short": "flm.",
|
|
74
|
+
"from:short": "fr.",
|
|
75
|
+
"letter:short": "let.",
|
|
76
|
+
"no date:short": "n.d.",
|
|
77
|
+
"no-place:short": "n.p.",
|
|
78
|
+
"no-publisher:short": "n.p.",
|
|
79
|
+
"original-work-published:short": "orig. pub.",
|
|
80
|
+
"personal-communication:short": "pers. comm.",
|
|
81
|
+
"podcast-episode:short": "podcast ep.",
|
|
82
|
+
"radio-broadcast:short": "radio bdcst.",
|
|
83
|
+
"radio-series:short": "radio ser.",
|
|
84
|
+
"radio-series-episode:short": "radio ser. ep.",
|
|
85
|
+
"reference:short": {
|
|
86
|
+
"single": "ref.",
|
|
87
|
+
"multiple": "refs."
|
|
88
|
+
},
|
|
89
|
+
"retrieved:short": "rtvd.",
|
|
90
|
+
"review-of:short": "rev. of",
|
|
91
|
+
"scale:short": "sc.",
|
|
92
|
+
"special-issue:short": "spec. iss.",
|
|
93
|
+
"special-section:short": "spec. sec.",
|
|
94
|
+
"television-broadcast:short": "TV bdcst.",
|
|
95
|
+
"television-series:short": "TV ser.",
|
|
96
|
+
"television-series-episode:short": "TV ser. ep.",
|
|
97
|
+
"video:short": "vid.",
|
|
98
|
+
"working-paper:short": "wkg. paper",
|
|
99
|
+
"and:symbol": "&",
|
|
100
|
+
"at:symbol": "@",
|
|
101
|
+
"article": "preprint",
|
|
102
|
+
"article-journal": "journal article",
|
|
103
|
+
"article-magazine": "magazine article",
|
|
104
|
+
"article-newspaper": "newspaper article",
|
|
105
|
+
"bill": "bill",
|
|
106
|
+
"broadcast": "broadcast",
|
|
107
|
+
"classic": "classical work",
|
|
108
|
+
"collection": "archival collection",
|
|
109
|
+
"dataset": "dataset",
|
|
110
|
+
"document": "document",
|
|
111
|
+
"entry": "entry",
|
|
112
|
+
"entry-dictionary": "dictionary entry",
|
|
113
|
+
"entry-encyclopedia": "encyclopedia entry",
|
|
114
|
+
"event": "event",
|
|
115
|
+
"graphic": "graphic",
|
|
116
|
+
"hearing": "hearing",
|
|
117
|
+
"interview": "interview",
|
|
118
|
+
"legal_case": "legal case",
|
|
119
|
+
"legislation": "legislation",
|
|
120
|
+
"manuscript": "manuscript",
|
|
121
|
+
"map": "map",
|
|
122
|
+
"motion_picture": "video recording",
|
|
123
|
+
"musical_score": "musical score",
|
|
124
|
+
"pamphlet": "pamphlet",
|
|
125
|
+
"paper-conference": "conference paper",
|
|
126
|
+
"patent": "patent",
|
|
127
|
+
"performance": "performance",
|
|
128
|
+
"periodical": "periodical",
|
|
129
|
+
"personal_communication": "personal communication",
|
|
130
|
+
"post": "post",
|
|
131
|
+
"post-weblog": "blog post",
|
|
132
|
+
"regulation": "regulation",
|
|
133
|
+
"report": "report",
|
|
134
|
+
"review": "review",
|
|
135
|
+
"review-book": "book review",
|
|
136
|
+
"software": "software",
|
|
137
|
+
"song": "audio recording",
|
|
138
|
+
"speech": "presentation",
|
|
139
|
+
"standard": "standard",
|
|
140
|
+
"thesis": "thesis",
|
|
141
|
+
"treaty": "treaty",
|
|
142
|
+
"webpage": "webpage",
|
|
143
|
+
"article-journal:short": "jour. art.",
|
|
144
|
+
"article-magazine:short": "mag. art.",
|
|
145
|
+
"article-newspaper:short": "newspaper art.",
|
|
146
|
+
"broadcast:short": "bdcst.",
|
|
147
|
+
"classic:short": "class. wk.",
|
|
148
|
+
"collection:short": "arch. coll.",
|
|
149
|
+
"document:short": "doc.",
|
|
150
|
+
"entry-dictionary:short": "dict. entry",
|
|
151
|
+
"entry-encyclopedia:short": "ency. entry",
|
|
152
|
+
"graphic:short": "gr.",
|
|
153
|
+
"interview:short": "int.",
|
|
154
|
+
"legal_case:short": "leg. case",
|
|
155
|
+
"legislation:short": "legis.",
|
|
156
|
+
"manuscript:short": {
|
|
157
|
+
"single": "MS",
|
|
158
|
+
"multiple": "MSS"
|
|
159
|
+
},
|
|
160
|
+
"motion_picture:short": "vid. rec.",
|
|
161
|
+
"musical_score:short": "mus. score",
|
|
162
|
+
"pamphlet:short": "pam.",
|
|
163
|
+
"paper-conference:short": "conf. paper",
|
|
164
|
+
"patent:short": "pat.",
|
|
165
|
+
"performance:short": "prfm.",
|
|
166
|
+
"personal_communication:short": "pers. comm.",
|
|
167
|
+
"regulation:short": "reg.",
|
|
168
|
+
"report:short": "rep.",
|
|
169
|
+
"review:short": "rev.",
|
|
170
|
+
"review-book:short": "bk. rev.",
|
|
171
|
+
"software:short": "sftw.",
|
|
172
|
+
"song:short": "au. rec.",
|
|
173
|
+
"standard:short": "std.",
|
|
174
|
+
"thesis:short": "thes.",
|
|
175
|
+
"webpage:short": "webpg.",
|
|
176
|
+
"hearing:verb": "testimony of",
|
|
177
|
+
"review:verb": "review of",
|
|
178
|
+
"review-book:verb": "review of the book",
|
|
179
|
+
"hearing:verb-short": "test. of",
|
|
180
|
+
"review:verb-short": "rev. of",
|
|
181
|
+
"review-book:verb-short": "rev. of the bk.",
|
|
182
|
+
"ad": "AD",
|
|
183
|
+
"bc": "BC",
|
|
184
|
+
"bce": "BCE",
|
|
185
|
+
"ce": "CE",
|
|
186
|
+
"open-quote": "“",
|
|
187
|
+
"close-quote": "”",
|
|
188
|
+
"open-inner-quote": "‘",
|
|
189
|
+
"close-inner-quote": "’",
|
|
190
|
+
"page-range-delimiter": "–",
|
|
191
|
+
"colon": ":",
|
|
192
|
+
"comma": ",",
|
|
193
|
+
"semicolon": ";",
|
|
194
|
+
"ordinal": "th",
|
|
195
|
+
"ordinal-01": "st",
|
|
196
|
+
"ordinal-02": "nd",
|
|
197
|
+
"ordinal-03": "rd",
|
|
198
|
+
"ordinal-11": "th",
|
|
199
|
+
"ordinal-12": "th",
|
|
200
|
+
"ordinal-13": "th",
|
|
201
|
+
"long-ordinal-01": "first",
|
|
202
|
+
"long-ordinal-02": "second",
|
|
203
|
+
"long-ordinal-03": "third",
|
|
204
|
+
"long-ordinal-04": "fourth",
|
|
205
|
+
"long-ordinal-05": "fifth",
|
|
206
|
+
"long-ordinal-06": "sixth",
|
|
207
|
+
"long-ordinal-07": "seventh",
|
|
208
|
+
"long-ordinal-08": "eighth",
|
|
209
|
+
"long-ordinal-09": "ninth",
|
|
210
|
+
"long-ordinal-10": "tenth",
|
|
211
|
+
"act": {
|
|
212
|
+
"single": "act",
|
|
213
|
+
"multiple": "acts"
|
|
214
|
+
},
|
|
215
|
+
"appendix": {
|
|
216
|
+
"single": "appendix",
|
|
217
|
+
"multiple": "appendices"
|
|
218
|
+
},
|
|
219
|
+
"article-locator": {
|
|
220
|
+
"single": "article",
|
|
221
|
+
"multiple": "articles"
|
|
222
|
+
},
|
|
223
|
+
"book": {
|
|
224
|
+
"single": "book",
|
|
225
|
+
"multiple": "books"
|
|
226
|
+
},
|
|
227
|
+
"canon": {
|
|
228
|
+
"single": "canon",
|
|
229
|
+
"multiple": "canons"
|
|
230
|
+
},
|
|
231
|
+
"chapter": {
|
|
232
|
+
"single": "chapter",
|
|
233
|
+
"multiple": "chapters"
|
|
234
|
+
},
|
|
235
|
+
"column": {
|
|
236
|
+
"single": "column",
|
|
237
|
+
"multiple": "columns"
|
|
238
|
+
},
|
|
239
|
+
"elocation": {
|
|
240
|
+
"single": "location",
|
|
241
|
+
"multiple": "locations"
|
|
242
|
+
},
|
|
243
|
+
"equation": {
|
|
244
|
+
"single": "equation",
|
|
245
|
+
"multiple": "equations"
|
|
246
|
+
},
|
|
247
|
+
"figure": {
|
|
248
|
+
"single": "figure",
|
|
249
|
+
"multiple": "figures"
|
|
250
|
+
},
|
|
251
|
+
"folio": {
|
|
252
|
+
"single": "folio",
|
|
253
|
+
"multiple": "folios"
|
|
254
|
+
},
|
|
255
|
+
"issue": {
|
|
256
|
+
"single": "issue",
|
|
257
|
+
"multiple": "issues"
|
|
258
|
+
},
|
|
259
|
+
"line": {
|
|
260
|
+
"single": "line",
|
|
261
|
+
"multiple": "lines"
|
|
262
|
+
},
|
|
263
|
+
"note": {
|
|
264
|
+
"single": "note",
|
|
265
|
+
"multiple": "notes"
|
|
266
|
+
},
|
|
267
|
+
"opus": {
|
|
268
|
+
"single": "opus",
|
|
269
|
+
"multiple": "opera"
|
|
270
|
+
},
|
|
271
|
+
"page": {
|
|
272
|
+
"single": "page",
|
|
273
|
+
"multiple": "pages"
|
|
274
|
+
},
|
|
275
|
+
"paragraph": {
|
|
276
|
+
"single": "paragraph",
|
|
277
|
+
"multiple": "paragraphs"
|
|
278
|
+
},
|
|
279
|
+
"part": {
|
|
280
|
+
"single": "part",
|
|
281
|
+
"multiple": "parts"
|
|
282
|
+
},
|
|
283
|
+
"rule": {
|
|
284
|
+
"single": "rule",
|
|
285
|
+
"multiple": "rules"
|
|
286
|
+
},
|
|
287
|
+
"scene": {
|
|
288
|
+
"single": "scene",
|
|
289
|
+
"multiple": "scenes"
|
|
290
|
+
},
|
|
291
|
+
"section": {
|
|
292
|
+
"single": "section",
|
|
293
|
+
"multiple": "sections"
|
|
294
|
+
},
|
|
295
|
+
"sub-verbo": {
|
|
296
|
+
"single": "sub verbo",
|
|
297
|
+
"multiple": "sub verbis"
|
|
298
|
+
},
|
|
299
|
+
"supplement": {
|
|
300
|
+
"single": "supplement",
|
|
301
|
+
"multiple": "supplements"
|
|
302
|
+
},
|
|
303
|
+
"table": {
|
|
304
|
+
"single": "table",
|
|
305
|
+
"multiple": "tables"
|
|
306
|
+
},
|
|
307
|
+
"timestamp": "",
|
|
308
|
+
"title-locator": {
|
|
309
|
+
"single": "title",
|
|
310
|
+
"multiple": "titles"
|
|
311
|
+
},
|
|
312
|
+
"verse": {
|
|
313
|
+
"single": "verse",
|
|
314
|
+
"multiple": "verses"
|
|
315
|
+
},
|
|
316
|
+
"volume": {
|
|
317
|
+
"single": "volume",
|
|
318
|
+
"multiple": "volumes"
|
|
319
|
+
},
|
|
320
|
+
"appendix:short": {
|
|
321
|
+
"single": "app.",
|
|
322
|
+
"multiple": "apps."
|
|
323
|
+
},
|
|
324
|
+
"article-locator:short": {
|
|
325
|
+
"single": "art.",
|
|
326
|
+
"multiple": "arts."
|
|
327
|
+
},
|
|
328
|
+
"book:short": {
|
|
329
|
+
"single": "bk.",
|
|
330
|
+
"multiple": "bks."
|
|
331
|
+
},
|
|
332
|
+
"canon:short": {
|
|
333
|
+
"single": "can.",
|
|
334
|
+
"multiple": "cann."
|
|
335
|
+
},
|
|
336
|
+
"chapter:short": {
|
|
337
|
+
"single": "chap.",
|
|
338
|
+
"multiple": "chaps."
|
|
339
|
+
},
|
|
340
|
+
"column:short": {
|
|
341
|
+
"single": "col.",
|
|
342
|
+
"multiple": "cols."
|
|
343
|
+
},
|
|
344
|
+
"elocation:short": {
|
|
345
|
+
"single": "loc.",
|
|
346
|
+
"multiple": "locs."
|
|
347
|
+
},
|
|
348
|
+
"equation:short": {
|
|
349
|
+
"single": "eq.",
|
|
350
|
+
"multiple": "eqq."
|
|
351
|
+
},
|
|
352
|
+
"figure:short": {
|
|
353
|
+
"single": "fig.",
|
|
354
|
+
"multiple": "figs."
|
|
355
|
+
},
|
|
356
|
+
"folio:short": {
|
|
357
|
+
"single": "fol.",
|
|
358
|
+
"multiple": "fols."
|
|
359
|
+
},
|
|
360
|
+
"issue:short": {
|
|
361
|
+
"single": "no.",
|
|
362
|
+
"multiple": "nos."
|
|
363
|
+
},
|
|
364
|
+
"line:short": {
|
|
365
|
+
"single": "l.",
|
|
366
|
+
"multiple": "ll."
|
|
367
|
+
},
|
|
368
|
+
"note:short": {
|
|
369
|
+
"single": "n.",
|
|
370
|
+
"multiple": "nn."
|
|
371
|
+
},
|
|
372
|
+
"opus:short": {
|
|
373
|
+
"single": "op.",
|
|
374
|
+
"multiple": "opp."
|
|
375
|
+
},
|
|
376
|
+
"page:short": {
|
|
377
|
+
"single": "p.",
|
|
378
|
+
"multiple": "pp."
|
|
379
|
+
},
|
|
380
|
+
"paragraph:short": {
|
|
381
|
+
"single": "para.",
|
|
382
|
+
"multiple": "paras."
|
|
383
|
+
},
|
|
384
|
+
"part:short": {
|
|
385
|
+
"single": "pt.",
|
|
386
|
+
"multiple": "pts."
|
|
387
|
+
},
|
|
388
|
+
"rule:short": {
|
|
389
|
+
"single": "r.",
|
|
390
|
+
"multiple": "rr."
|
|
391
|
+
},
|
|
392
|
+
"scene:short": {
|
|
393
|
+
"single": "sc.",
|
|
394
|
+
"multiple": "scs."
|
|
395
|
+
},
|
|
396
|
+
"section:short": {
|
|
397
|
+
"single": "sec.",
|
|
398
|
+
"multiple": "secs."
|
|
399
|
+
},
|
|
400
|
+
"sub-verbo:short": {
|
|
401
|
+
"single": "s.v.",
|
|
402
|
+
"multiple": "s.vv."
|
|
403
|
+
},
|
|
404
|
+
"supplement:short": {
|
|
405
|
+
"single": "supp.",
|
|
406
|
+
"multiple": "supps."
|
|
407
|
+
},
|
|
408
|
+
"table:short": {
|
|
409
|
+
"single": "tbl.",
|
|
410
|
+
"multiple": "tbls."
|
|
411
|
+
},
|
|
412
|
+
"title-locator:short": {
|
|
413
|
+
"single": "tit.",
|
|
414
|
+
"multiple": "titt."
|
|
415
|
+
},
|
|
416
|
+
"verse:short": {
|
|
417
|
+
"single": "v.",
|
|
418
|
+
"multiple": "vv."
|
|
419
|
+
},
|
|
420
|
+
"volume:short": {
|
|
421
|
+
"single": "vol.",
|
|
422
|
+
"multiple": "vols."
|
|
423
|
+
},
|
|
424
|
+
"chapter:symbol": {
|
|
425
|
+
"single": "c.",
|
|
426
|
+
"multiple": "cc."
|
|
427
|
+
},
|
|
428
|
+
"paragraph:symbol": {
|
|
429
|
+
"single": "¶",
|
|
430
|
+
"multiple": "¶¶"
|
|
431
|
+
},
|
|
432
|
+
"section:symbol": {
|
|
433
|
+
"single": "§",
|
|
434
|
+
"multiple": "§§"
|
|
435
|
+
},
|
|
436
|
+
"chapter-number": {
|
|
437
|
+
"single": "chapter",
|
|
438
|
+
"multiple": "chapters"
|
|
439
|
+
},
|
|
440
|
+
"citation-number": {
|
|
441
|
+
"single": "citation",
|
|
442
|
+
"multiple": "citations"
|
|
443
|
+
},
|
|
444
|
+
"collection-number": {
|
|
445
|
+
"single": "number",
|
|
446
|
+
"multiple": "numbers"
|
|
447
|
+
},
|
|
448
|
+
"edition": {
|
|
449
|
+
"single": "edition",
|
|
450
|
+
"multiple": "editions"
|
|
451
|
+
},
|
|
452
|
+
"first-reference-note-number": {
|
|
453
|
+
"single": "reference",
|
|
454
|
+
"multiple": "references"
|
|
455
|
+
},
|
|
456
|
+
"number": {
|
|
457
|
+
"single": "number",
|
|
458
|
+
"multiple": "numbers"
|
|
459
|
+
},
|
|
460
|
+
"number-of-pages": {
|
|
461
|
+
"single": "page",
|
|
462
|
+
"multiple": "pages"
|
|
463
|
+
},
|
|
464
|
+
"number-of-volumes": {
|
|
465
|
+
"single": "volume",
|
|
466
|
+
"multiple": "volumes"
|
|
467
|
+
},
|
|
468
|
+
"page-first": {
|
|
469
|
+
"single": "page",
|
|
470
|
+
"multiple": "pages"
|
|
471
|
+
},
|
|
472
|
+
"printing": {
|
|
473
|
+
"single": "printing",
|
|
474
|
+
"multiple": "printings"
|
|
475
|
+
},
|
|
476
|
+
"version": {
|
|
477
|
+
"single": "version",
|
|
478
|
+
"multiple": "versions"
|
|
479
|
+
},
|
|
480
|
+
"chapter-number:short": {
|
|
481
|
+
"single": "chap.",
|
|
482
|
+
"multiple": "chaps."
|
|
483
|
+
},
|
|
484
|
+
"citation-number:short": {
|
|
485
|
+
"single": "cit.",
|
|
486
|
+
"multiple": "cits."
|
|
487
|
+
},
|
|
488
|
+
"collection-number:short": {
|
|
489
|
+
"single": "no.",
|
|
490
|
+
"multiple": "nos."
|
|
491
|
+
},
|
|
492
|
+
"edition:short": {
|
|
493
|
+
"single": "ed.",
|
|
494
|
+
"multiple": "eds."
|
|
495
|
+
},
|
|
496
|
+
"first-reference-note-number:short": {
|
|
497
|
+
"single": "ref.",
|
|
498
|
+
"multiple": "refs."
|
|
499
|
+
},
|
|
500
|
+
"number:short": {
|
|
501
|
+
"single": "no.",
|
|
502
|
+
"multiple": "nos."
|
|
503
|
+
},
|
|
504
|
+
"number-of-pages:short": {
|
|
505
|
+
"single": "p.",
|
|
506
|
+
"multiple": "pp."
|
|
507
|
+
},
|
|
508
|
+
"number-of-volumes:short": {
|
|
509
|
+
"single": "vol.",
|
|
510
|
+
"multiple": "vols."
|
|
511
|
+
},
|
|
512
|
+
"page-first:short": {
|
|
513
|
+
"single": "p.",
|
|
514
|
+
"multiple": "pp."
|
|
515
|
+
},
|
|
516
|
+
"printing:short": {
|
|
517
|
+
"single": "ptg.",
|
|
518
|
+
"multiple": "ptgs."
|
|
519
|
+
},
|
|
520
|
+
"version:short": "v.",
|
|
521
|
+
"author": "",
|
|
522
|
+
"chair": {
|
|
523
|
+
"single": "chair",
|
|
524
|
+
"multiple": "chairs"
|
|
525
|
+
},
|
|
526
|
+
"collection-editor": {
|
|
527
|
+
"single": "editor",
|
|
528
|
+
"multiple": "editors"
|
|
529
|
+
},
|
|
530
|
+
"compiler": {
|
|
531
|
+
"single": "compiler",
|
|
532
|
+
"multiple": "compilers"
|
|
533
|
+
},
|
|
534
|
+
"composer": "",
|
|
535
|
+
"container-author": "",
|
|
536
|
+
"contributor": {
|
|
537
|
+
"single": "contributor",
|
|
538
|
+
"multiple": "contributors"
|
|
539
|
+
},
|
|
540
|
+
"curator": {
|
|
541
|
+
"single": "curator",
|
|
542
|
+
"multiple": "curators"
|
|
543
|
+
},
|
|
544
|
+
"director": {
|
|
545
|
+
"single": "director",
|
|
546
|
+
"multiple": "directors"
|
|
547
|
+
},
|
|
548
|
+
"editor": {
|
|
549
|
+
"single": "editor",
|
|
550
|
+
"multiple": "editors"
|
|
551
|
+
},
|
|
552
|
+
"editor-translator": {
|
|
553
|
+
"single": "editor & translator",
|
|
554
|
+
"multiple": "editors & translators"
|
|
555
|
+
},
|
|
556
|
+
"editortranslator": {
|
|
557
|
+
"single": "editor & translator",
|
|
558
|
+
"multiple": "editors & translators"
|
|
559
|
+
},
|
|
560
|
+
"editorial-director": {
|
|
561
|
+
"single": "editor",
|
|
562
|
+
"multiple": "editors"
|
|
563
|
+
},
|
|
564
|
+
"executive-producer": {
|
|
565
|
+
"single": "executive producer",
|
|
566
|
+
"multiple": "executive producers"
|
|
567
|
+
},
|
|
568
|
+
"guest": {
|
|
569
|
+
"single": "guest",
|
|
570
|
+
"multiple": "guests"
|
|
571
|
+
},
|
|
572
|
+
"host": {
|
|
573
|
+
"single": "host",
|
|
574
|
+
"multiple": "hosts"
|
|
575
|
+
},
|
|
576
|
+
"illustrator": {
|
|
577
|
+
"single": "illustrator",
|
|
578
|
+
"multiple": "illustrators"
|
|
579
|
+
},
|
|
580
|
+
"interviewer": "",
|
|
581
|
+
"narrator": {
|
|
582
|
+
"single": "narrator",
|
|
583
|
+
"multiple": "narrators"
|
|
584
|
+
},
|
|
585
|
+
"organizer": {
|
|
586
|
+
"single": "organizer",
|
|
587
|
+
"multiple": "organizers"
|
|
588
|
+
},
|
|
589
|
+
"original-author": "",
|
|
590
|
+
"performer": {
|
|
591
|
+
"single": "performer",
|
|
592
|
+
"multiple": "performers"
|
|
593
|
+
},
|
|
594
|
+
"producer": {
|
|
595
|
+
"single": "producer",
|
|
596
|
+
"multiple": "producers"
|
|
597
|
+
},
|
|
598
|
+
"recipient": "",
|
|
599
|
+
"reviewed-author": "",
|
|
600
|
+
"script-writer": {
|
|
601
|
+
"single": "writer",
|
|
602
|
+
"multiple": "writers"
|
|
603
|
+
},
|
|
604
|
+
"series-creator": {
|
|
605
|
+
"single": "series creator",
|
|
606
|
+
"multiple": "series creators"
|
|
607
|
+
},
|
|
608
|
+
"translator": {
|
|
609
|
+
"single": "translator",
|
|
610
|
+
"multiple": "translators"
|
|
611
|
+
},
|
|
612
|
+
"collection-editor:short": {
|
|
613
|
+
"single": "ed.",
|
|
614
|
+
"multiple": "eds."
|
|
615
|
+
},
|
|
616
|
+
"compiler:short": {
|
|
617
|
+
"single": "comp.",
|
|
618
|
+
"multiple": "comps."
|
|
619
|
+
},
|
|
620
|
+
"contributor:short": {
|
|
621
|
+
"single": "contrib.",
|
|
622
|
+
"multiple": "contribs."
|
|
623
|
+
},
|
|
624
|
+
"curator:short": {
|
|
625
|
+
"single": "cur.",
|
|
626
|
+
"multiple": "curs."
|
|
627
|
+
},
|
|
628
|
+
"director:short": {
|
|
629
|
+
"single": "dir.",
|
|
630
|
+
"multiple": "dirs."
|
|
631
|
+
},
|
|
632
|
+
"editor:short": {
|
|
633
|
+
"single": "ed.",
|
|
634
|
+
"multiple": "eds."
|
|
635
|
+
},
|
|
636
|
+
"editor-translator:short": {
|
|
637
|
+
"single": "ed. & trans.",
|
|
638
|
+
"multiple": "eds. & trans."
|
|
639
|
+
},
|
|
640
|
+
"editortranslator:short": {
|
|
641
|
+
"single": "ed. & trans.",
|
|
642
|
+
"multiple": "eds. & trans."
|
|
643
|
+
},
|
|
644
|
+
"editorial-director:short": {
|
|
645
|
+
"single": "ed.",
|
|
646
|
+
"multiple": "eds."
|
|
647
|
+
},
|
|
648
|
+
"executive-producer:short": {
|
|
649
|
+
"single": "exec. prod.",
|
|
650
|
+
"multiple": "exec. prods."
|
|
651
|
+
},
|
|
652
|
+
"illustrator:short": {
|
|
653
|
+
"single": "ill.",
|
|
654
|
+
"multiple": "ills."
|
|
655
|
+
},
|
|
656
|
+
"narrator:short": {
|
|
657
|
+
"single": "narr.",
|
|
658
|
+
"multiple": "narrs."
|
|
659
|
+
},
|
|
660
|
+
"organizer:short": {
|
|
661
|
+
"single": "org.",
|
|
662
|
+
"multiple": "orgs."
|
|
663
|
+
},
|
|
664
|
+
"performer:short": {
|
|
665
|
+
"single": "perf.",
|
|
666
|
+
"multiple": "perfs."
|
|
667
|
+
},
|
|
668
|
+
"producer:short": {
|
|
669
|
+
"single": "prod.",
|
|
670
|
+
"multiple": "prods."
|
|
671
|
+
},
|
|
672
|
+
"script-writer:short": {
|
|
673
|
+
"single": "wrtr.",
|
|
674
|
+
"multiple": "wrtrs."
|
|
675
|
+
},
|
|
676
|
+
"series-creator:short": {
|
|
677
|
+
"single": "ser. creator",
|
|
678
|
+
"multiple": "ser. creators"
|
|
679
|
+
},
|
|
680
|
+
"translator:short": "trans.",
|
|
681
|
+
"chair:verb": "chaired by",
|
|
682
|
+
"collection-editor:verb": "edited by",
|
|
683
|
+
"compiler:verb": "compiled by",
|
|
684
|
+
"composer:verb": "composed by",
|
|
685
|
+
"container-author:verb": "by",
|
|
686
|
+
"contributor:verb": "with",
|
|
687
|
+
"curator:verb": "curated by",
|
|
688
|
+
"director:verb": "directed by",
|
|
689
|
+
"editor:verb": "edited by",
|
|
690
|
+
"editor-translator:verb": "edited & translated by",
|
|
691
|
+
"editortranslator:verb": "edited & translated by",
|
|
692
|
+
"editorial-director:verb": "edited by",
|
|
693
|
+
"executive-producer:verb": "executive produced by",
|
|
694
|
+
"guest:verb": {
|
|
695
|
+
"single": "with guest",
|
|
696
|
+
"multiple": "with guests"
|
|
697
|
+
},
|
|
698
|
+
"host:verb": "hosted by",
|
|
699
|
+
"illustrator:verb": "illustrated by",
|
|
700
|
+
"interviewer:verb": "interview by",
|
|
701
|
+
"narrator:verb": "narrated by",
|
|
702
|
+
"organizer:verb": "organized by",
|
|
703
|
+
"original-author:verb": "by",
|
|
704
|
+
"performer:verb": "performed by",
|
|
705
|
+
"producer:verb": "produced by",
|
|
706
|
+
"recipient:verb": "to",
|
|
707
|
+
"reviewed-author:verb": "by",
|
|
708
|
+
"script-writer:verb": "written by",
|
|
709
|
+
"series-creator:verb": "created by",
|
|
710
|
+
"translator:verb": "translated by",
|
|
711
|
+
"collection-editor:verb-short": "ed. by",
|
|
712
|
+
"compiler:verb-short": "comp. by",
|
|
713
|
+
"composer:verb-short": "comp. by",
|
|
714
|
+
"curator:verb-short": "cur. by",
|
|
715
|
+
"director:verb-short": "dir. by",
|
|
716
|
+
"editor:verb-short": "ed. by",
|
|
717
|
+
"editor-translator:verb-short": "ed. & trans. by",
|
|
718
|
+
"editortranslator:verb-short": "ed. & trans. by",
|
|
719
|
+
"editorial-director:verb-short": "ed. by",
|
|
720
|
+
"executive-producer:verb-short": "exec. prod. by",
|
|
721
|
+
"illustrator:verb-short": "ill. by",
|
|
722
|
+
"narrator:verb-short": "narr. by",
|
|
723
|
+
"organizer:verb-short": "org. by",
|
|
724
|
+
"performer:verb-short": "perf. by",
|
|
725
|
+
"producer:verb-short": "prod. by",
|
|
726
|
+
"script-writer:verb-short": "writ. by",
|
|
727
|
+
"translator:verb-short": "trans. by",
|
|
728
|
+
"month-01": "January",
|
|
729
|
+
"month-02": "February",
|
|
730
|
+
"month-03": "March",
|
|
731
|
+
"month-04": "April",
|
|
732
|
+
"month-05": "May",
|
|
733
|
+
"month-06": "June",
|
|
734
|
+
"month-07": "July",
|
|
735
|
+
"month-08": "August",
|
|
736
|
+
"month-09": "September",
|
|
737
|
+
"month-10": "October",
|
|
738
|
+
"month-11": "November",
|
|
739
|
+
"month-12": "December",
|
|
740
|
+
"month-01:short": "Jan.",
|
|
741
|
+
"month-02:short": "Feb.",
|
|
742
|
+
"month-03:short": "Mar.",
|
|
743
|
+
"month-04:short": "Apr.",
|
|
744
|
+
"month-05:short": "May",
|
|
745
|
+
"month-06:short": "June",
|
|
746
|
+
"month-07:short": "July",
|
|
747
|
+
"month-08:short": "Aug.",
|
|
748
|
+
"month-09:short": "Sept.",
|
|
749
|
+
"month-10:short": "Oct.",
|
|
750
|
+
"month-11:short": "Nov.",
|
|
751
|
+
"month-12:short": "Dec.",
|
|
752
|
+
"season-01": "Spring",
|
|
753
|
+
"season-02": "Summer",
|
|
754
|
+
"season-03": "Autumn",
|
|
755
|
+
"season-04": "Winter"
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
const MONTHS = {"1":"January","2":"February","3":"March","4":"April","5":"May","6":"June","7":"July","8":"August","9":"September","10":"October","11":"November","12":"December"}
|
|
759
|
+
|
|
760
|
+
const NAME_OPTS = {}
|
|
761
|
+
|
|
762
|
+
function _nameConfig(ctx, el) {
|
|
763
|
+
const c = Object.assign({}, NAME_OPTS, ctx._secOpts || {}, el)
|
|
764
|
+
if (el.initialize === false || (ctx._secOpts || {}).initialize === false || NAME_OPTS.initialize === false) c.initialize = false
|
|
765
|
+
if (c.and === 'text') c.andTerm = T['and'] || 'and'
|
|
766
|
+
else if (c.and === 'symbol') c.andTerm = '&'
|
|
767
|
+
if (!c.etAlTerm) c.etAlTerm = T[el._etAlTerm || 'et-al'] || 'et al.'
|
|
768
|
+
if (ctx._disambig) c._disambig = ctx._disambig
|
|
769
|
+
return c
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
function macro_status(item, ctx) {
|
|
773
|
+
let _ch0 = ''
|
|
774
|
+
if (!((item.page != null && item.page !== '')) && !((item.issue != null && item.issue !== '')) && !((item.volume != null && item.volume !== ''))) {
|
|
775
|
+
const _v1 = (item.status != null && item.status !== '' ? String(item.status) : '')
|
|
776
|
+
_ch0 = ((applyTextCase(_v1, "capitalize-first") ? '\uE002' + applyTextCase(_v1, "capitalize-first") + '\uE003' : '') ? '\uE020status\uE021' + (applyTextCase(_v1, "capitalize-first") ? '\uE002' + applyTextCase(_v1, "capitalize-first") + '\uE003' : '') + '\uE022' : '')
|
|
777
|
+
}
|
|
778
|
+
return _ch0
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
function macro_edition(item, ctx) {
|
|
782
|
+
let _ch2 = ''
|
|
783
|
+
if ((item.type === "bill" || item.type === "book" || item.type === "chapter" || item.type === "graphic" || item.type === "legal_case" || item.type === "legislation" || item.type === "motion_picture" || item.type === "paper-conference" || item.type === "report" || item.type === "song")) {
|
|
784
|
+
let _ch3 = ''
|
|
785
|
+
if ((item.edition != null && /^\s*\d/.test(String(item.edition)))) {
|
|
786
|
+
const _v6 = item.edition != null ? String(item.edition) : ''
|
|
787
|
+
const _v7 = (T["edition:short"] != null ? (typeof T["edition:short"] === 'string' ? T["edition:short"] : (T["edition:short"].single || '')) : '')
|
|
788
|
+
const _g4 = ((item.edition == null || item.edition === '')) ? '' : [((_v6 && !isNaN(Number(_v6)) ? ordinal(Number(_v6)) : _v6) ? '\uE020edition\uE021' + (_v6 && !isNaN(Number(_v6)) ? ordinal(Number(_v6)) : _v6) + '\uE022' : ''), _v7].filter(v => v !== '').join(" ")
|
|
789
|
+
_ch3 = _g4
|
|
790
|
+
}
|
|
791
|
+
else {
|
|
792
|
+
const _v8 = (item.edition != null && item.edition !== '' ? String(item.edition) : '')
|
|
793
|
+
_ch3 = ((applyTextCase(_v8, "capitalize-first") ? applyTextCase(_v8, "capitalize-first") + "." : '') ? '\uE020edition\uE021' + (applyTextCase(_v8, "capitalize-first") ? applyTextCase(_v8, "capitalize-first") + "." : '') + '\uE022' : '')
|
|
794
|
+
}
|
|
795
|
+
_ch2 = _ch3
|
|
796
|
+
}
|
|
797
|
+
return _ch2
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
function macro_issued(item, ctx) {
|
|
801
|
+
let _ch9 = ''
|
|
802
|
+
if ((item.type === "article-journal" || item.type === "report")) {
|
|
803
|
+
const _d10 = item.issued ? formatDate(item.issued, {"dateParts":[{"name":"month","form":"short","prefix":"","suffix":" ","rangeDelimiter":null},{"name":"year","form":"long","prefix":"","suffix":"","rangeDelimiter":null}],"monthTerms":{"1":"January","2":"February","3":"March","4":"April","5":"May","6":"June","7":"July","8":"August","9":"September","10":"October","11":"November","12":"December"},"seasonTerms":{"1":"Spring","2":"Summer","3":"Autumn","4":"Winter"}}) : ''
|
|
804
|
+
_ch9 = (_d10 ? '\uE020issued\uE021' + _d10 + '\uE022' : '')
|
|
805
|
+
}
|
|
806
|
+
else if ((item.type === "bill" || item.type === "book" || item.type === "chapter" || item.type === "graphic" || item.type === "legal_case" || item.type === "legislation" || item.type === "song" || item.type === "thesis")) {
|
|
807
|
+
const _d11 = item.issued ? formatDate(item.issued, {"dateParts":[{"name":"year","form":"long","prefix":"","suffix":"","rangeDelimiter":null}],"monthTerms":{"1":"January","2":"February","3":"March","4":"April","5":"May","6":"June","7":"July","8":"August","9":"September","10":"October","11":"November","12":"December"},"seasonTerms":{"1":"Spring","2":"Summer","3":"Autumn","4":"Winter"}}) : ''
|
|
808
|
+
_ch9 = (_d11 ? '\uE020issued\uE021' + _d11 + '\uE022' : '')
|
|
809
|
+
}
|
|
810
|
+
else if (item.type === "paper-conference") {
|
|
811
|
+
const _d12 = item.issued ? formatDate(item.issued, {"dateParts":[{"name":"month","form":"short","prefix":"","suffix":"","rangeDelimiter":null},{"name":"year","form":null,"prefix":" ","suffix":"","rangeDelimiter":null}],"monthTerms":{"1":"January","2":"February","3":"March","4":"April","5":"May","6":"June","7":"July","8":"August","9":"September","10":"October","11":"November","12":"December"},"seasonTerms":{"1":"Spring","2":"Summer","3":"Autumn","4":"Winter"}}) : ''
|
|
812
|
+
_ch9 = (_d12 ? '\uE020issued\uE021' + _d12 + '\uE022' : '')
|
|
813
|
+
}
|
|
814
|
+
else if (item.type === "motion_picture") {
|
|
815
|
+
const _d13 = item.issued ? formatDate(item.issued, {"dateParts":[{"name":"month","form":null,"prefix":"","suffix":" ","rangeDelimiter":null},{"name":"day","form":null,"prefix":"","suffix":", ","rangeDelimiter":null},{"name":"year","form":null,"prefix":"","suffix":"","rangeDelimiter":null}],"monthTerms":{"1":"January","2":"February","3":"March","4":"April","5":"May","6":"June","7":"July","8":"August","9":"September","10":"October","11":"November","12":"December"},"seasonTerms":{"1":"Spring","2":"Summer","3":"Autumn","4":"Winter"}}) : ''
|
|
816
|
+
_ch9 = ((_d13 ? "(" + _d13 + ")" : '') ? '\uE020issued\uE021' + (_d13 ? "(" + _d13 + ")" : '') + '\uE022' : '')
|
|
817
|
+
}
|
|
818
|
+
else {
|
|
819
|
+
const _d14 = item.issued ? formatDate(item.issued, {"dateParts":[{"name":"month","form":null,"prefix":"","suffix":" ","rangeDelimiter":null},{"name":"day","form":null,"prefix":"","suffix":", ","rangeDelimiter":null},{"name":"year","form":null,"prefix":"","suffix":"","rangeDelimiter":null}],"monthTerms":{"1":"January","2":"February","3":"March","4":"April","5":"May","6":"June","7":"July","8":"August","9":"September","10":"October","11":"November","12":"December"},"seasonTerms":{"1":"Spring","2":"Summer","3":"Autumn","4":"Winter"}}) : ''
|
|
820
|
+
_ch9 = (_d14 ? '\uE020issued\uE021' + _d14 + '\uE022' : '')
|
|
821
|
+
}
|
|
822
|
+
return _ch9
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
function macro_author(item, ctx) {
|
|
826
|
+
let _n15 = ''
|
|
827
|
+
if (item.author && item.author.length) {
|
|
828
|
+
_n15 = formatNames(item.author, _nameConfig(ctx, {"and":"text","delimiter":", ","etAlMin":7,"etAlUseFirst":1,"etAlUseLast":false,"initializeWith":". ","sortSeparator":", "}))
|
|
829
|
+
if (_n15) _n15 = '\uE020author\uE021' + _n15 + '\uE022'
|
|
830
|
+
}
|
|
831
|
+
if (!_n15) {
|
|
832
|
+
let _n16 = ''
|
|
833
|
+
if (item.editor && item.editor.length) {
|
|
834
|
+
_n16 = formatNames(item.editor, _nameConfig(ctx, {"and":"text","delimiter":", ","etAlMin":7,"etAlUseFirst":1,"etAlUseLast":false,"initializeWith":". ","sortSeparator":", "}))
|
|
835
|
+
if (_n16) _n16 = '\uE020editor\uE021' + _n16 + '\uE022'
|
|
836
|
+
}
|
|
837
|
+
if (!_n15) _n15 = _n16
|
|
838
|
+
let _n17 = ''
|
|
839
|
+
if (item.translator && item.translator.length) {
|
|
840
|
+
_n17 = formatNames(item.translator, _nameConfig(ctx, {"and":"text","delimiter":", ","etAlMin":7,"etAlUseFirst":1,"etAlUseLast":false,"initializeWith":". ","sortSeparator":", "}))
|
|
841
|
+
if (_n17) _n17 = '\uE020translator\uE021' + _n17 + '\uE022'
|
|
842
|
+
}
|
|
843
|
+
if (!_n15) _n15 = _n17
|
|
844
|
+
const _v18 = macro_director(item, ctx)
|
|
845
|
+
if (!_n15) _n15 = _v18
|
|
846
|
+
}
|
|
847
|
+
return _n15
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
function macro_editor(item, ctx) {
|
|
851
|
+
let _n19 = ''
|
|
852
|
+
if (item.editor && item.editor.length) {
|
|
853
|
+
_n19 = formatNames(item.editor, _nameConfig(ctx, {"and":"text","delimiter":", ","etAlUseLast":false,"initializeWith":". ","sortSeparator":", "}))
|
|
854
|
+
if (_n19) _n19 = '\uE020editor\uE021' + _n19 + '\uE022'
|
|
855
|
+
}
|
|
856
|
+
return _n19
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
function macro_director(item, ctx) {
|
|
860
|
+
let _n20 = ''
|
|
861
|
+
if (item.director && item.director.length) {
|
|
862
|
+
_n20 = formatNames(item.director, _nameConfig(ctx, {"and":"text","delimiter":", ","etAlMin":7,"etAlUseFirst":1,"etAlUseLast":false,"initializeWith":". ","sortSeparator":", "}))
|
|
863
|
+
if (_n20) _n20 = '\uE020director\uE021' + _n20 + '\uE022'
|
|
864
|
+
}
|
|
865
|
+
return _n20
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
function macro_locators(item, ctx) {
|
|
869
|
+
const _v23 = macro_edition(item, ctx)
|
|
870
|
+
const _v26 = (T["volume:short"] != null ? (typeof T["volume:short"] === 'string' ? T["volume:short"] : (T["volume:short"].single || '')) : '')
|
|
871
|
+
const _v27 = item.volume != null ? String(item.volume) : ''
|
|
872
|
+
const _g24 = ((item.volume == null || item.volume === '')) ? '' : [_v26, (_v27 ? '\uE020volume\uE021' + _v27 + '\uE022' : '')].filter(v => v !== '').join(" ")
|
|
873
|
+
const _v30 = item["number-of-volumes"] != null ? String(item["number-of-volumes"]) : ''
|
|
874
|
+
const _v31 = (T["volume:short"] != null ? (typeof T["volume:short"] === 'string' ? T["volume:short"] : (T["volume:short"].multiple || T["volume:short"].single || '')) : '')
|
|
875
|
+
const _g28 = ((item["number-of-volumes"] == null || item["number-of-volumes"] === '')) ? '' : [(_v30 ? '\uE020number-of-volumes\uE021' + _v30 + '\uE022' : ''), _v31].filter(v => v !== '').join(" ")
|
|
876
|
+
const _v34 = (T["issue:short"] != null ? (typeof T["issue:short"] === 'string' ? T["issue:short"] : (T["issue:short"].single || '')) : '')
|
|
877
|
+
const _v35 = item.issue != null ? String(item.issue) : ''
|
|
878
|
+
const _g32 = ((item.issue == null || item.issue === '')) ? '' : [_v34, (_v35 ? '\uE020issue\uE021' + _v35 + '\uE022' : '')].filter(v => v !== '').join(" ")
|
|
879
|
+
const _g21 = (!macro_edition(item, ctx) && (item.volume == null || item.volume === '') && (item["number-of-volumes"] == null || item["number-of-volumes"] === '') && (item.issue == null || item.issue === '')) ? '' : [_v23, _g24, _g28, _g32].filter(v => v !== '').join(", ")
|
|
880
|
+
return _g21
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
function macro_title(item, ctx) {
|
|
884
|
+
let _ch36 = ''
|
|
885
|
+
if ((item.type === "bill" || item.type === "book" || item.type === "graphic" || item.type === "legal_case" || item.type === "legislation" || item.type === "motion_picture" || item.type === "song" || item.type === "standard" || item.type === "software")) {
|
|
886
|
+
const _v37 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
887
|
+
_ch36 = ((stripNocaseSpans(_v37) ? '\uE000' + stripNocaseSpans(_v37) + '\uE001' : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v37) ? '\uE000' + stripNocaseSpans(_v37) + '\uE001' : '') + '\uE022' : '')
|
|
888
|
+
}
|
|
889
|
+
else {
|
|
890
|
+
const _v38 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
891
|
+
_ch36 = ((stripNocaseSpans(_v38) ? '“' + stripNocaseSpans(_v38) + '”' : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v38) ? '“' + stripNocaseSpans(_v38) + '”' : '') + '\uE022' : '')
|
|
892
|
+
}
|
|
893
|
+
return _ch36
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
function macro_publisher(item, ctx) {
|
|
897
|
+
let _ch39 = ''
|
|
898
|
+
if ((item.type === "bill" || item.type === "book" || item.type === "chapter" || item.type === "graphic" || item.type === "legal_case" || item.type === "legislation" || item.type === "motion_picture" || item.type === "paper-conference" || item.type === "song")) {
|
|
899
|
+
const _v42 = (item["publisher-place"] != null && item["publisher-place"] !== '' ? String(item["publisher-place"]) : '')
|
|
900
|
+
const _v43 = (item.publisher != null && item.publisher !== '' ? String(item.publisher) : '')
|
|
901
|
+
const _g40 = ((item["publisher-place"] == null || item["publisher-place"] === '') && (item.publisher == null || item.publisher === '')) ? '' : [(stripNocaseSpans(_v42) ? '\uE020publisher-place\uE021' + stripNocaseSpans(_v42) + '\uE022' : ''), (stripNocaseSpans(_v43) ? '\uE020publisher\uE021' + stripNocaseSpans(_v43) + '\uE022' : '')].filter(v => v !== '').join(": ")
|
|
902
|
+
_ch39 = _g40
|
|
903
|
+
}
|
|
904
|
+
else {
|
|
905
|
+
const _v46 = (item.publisher != null && item.publisher !== '' ? String(item.publisher) : '')
|
|
906
|
+
const _v47 = (item["publisher-place"] != null && item["publisher-place"] !== '' ? String(item["publisher-place"]) : '')
|
|
907
|
+
const _g44 = ((item.publisher == null || item.publisher === '') && (item["publisher-place"] == null || item["publisher-place"] === '')) ? '' : [(stripNocaseSpans(_v46) ? '\uE020publisher\uE021' + stripNocaseSpans(_v46) + '\uE022' : ''), (stripNocaseSpans(_v47) ? '\uE020publisher-place\uE021' + stripNocaseSpans(_v47) + '\uE022' : '')].filter(v => v !== '').join(", ")
|
|
908
|
+
_ch39 = _g44
|
|
909
|
+
}
|
|
910
|
+
return _ch39
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
function macro_event(item, ctx) {
|
|
914
|
+
let _ch48 = ''
|
|
915
|
+
if ((item.type === "paper-conference" || item.type === "speech")) {
|
|
916
|
+
let _ch49 = ''
|
|
917
|
+
if ((item["container-title"] != null && item["container-title"] !== '')) {
|
|
918
|
+
const _v52 = (T["in"] != null ? (typeof T["in"] === 'string' ? T["in"] : (T["in"].single || '')) : '')
|
|
919
|
+
const _v53 = (item["container-title"] != null && item["container-title"] !== '' ? String(item["container-title"]) : '')
|
|
920
|
+
const _g50 = ((item["container-title"] == null || item["container-title"] === '')) ? '' : [_v52, ((stripNocaseSpans(_v53) ? '\uE000' + stripNocaseSpans(_v53) + '\uE001' : '') ? '\uE020container-title\uE021' + (stripNocaseSpans(_v53) ? '\uE000' + stripNocaseSpans(_v53) + '\uE001' : '') + '\uE022' : '')].filter(v => v !== '').join(" ")
|
|
921
|
+
_ch49 = _g50
|
|
922
|
+
}
|
|
923
|
+
else {
|
|
924
|
+
const _v56 = (T["presented at"] != null ? (typeof T["presented at"] === 'string' ? T["presented at"] : (T["presented at"].single || '')) : '')
|
|
925
|
+
const _v57 = (item.event != null && item.event !== '' ? String(item.event) : '')
|
|
926
|
+
const _g54 = ((item.event == null || item.event === '')) ? '' : [_v56, (stripNocaseSpans(_v57) ? '\uE020event\uE021' + stripNocaseSpans(_v57) + '\uE022' : '')].filter(v => v !== '').join(" ")
|
|
927
|
+
_ch49 = _g54
|
|
928
|
+
}
|
|
929
|
+
_ch48 = _ch49
|
|
930
|
+
}
|
|
931
|
+
return _ch48
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
function macro_access(item, ctx) {
|
|
935
|
+
let _ch58 = ''
|
|
936
|
+
if ((item.type === "webpage" || item.type === "post" || item.type === "post-weblog")) {
|
|
937
|
+
let _ch59 = ''
|
|
938
|
+
if ((item.URL != null && item.URL !== '')) {
|
|
939
|
+
const _v64 = (T["accessed"] != null ? (typeof T["accessed"] === 'string' ? T["accessed"] : (T["accessed"].single || '')) : '')
|
|
940
|
+
const _d65 = item.accessed ? formatDate(item.accessed, {"dateParts":[{"name":"month","form":null,"prefix":"","suffix":" ","rangeDelimiter":null},{"name":"day","form":null,"prefix":"","suffix":", ","rangeDelimiter":null},{"name":"year","form":null,"prefix":"","suffix":"","rangeDelimiter":null}],"monthTerms":{"1":"January","2":"February","3":"March","4":"April","5":"May","6":"June","7":"July","8":"August","9":"September","10":"October","11":"November","12":"December"},"seasonTerms":{"1":"Spring","2":"Summer","3":"Autumn","4":"Winter"}}) : ''
|
|
941
|
+
const _g62 = ((item.accessed == null || item.accessed === '')) ? '' : [applyTextCase(_v64, "capitalize-first"), (_d65 ? '\uE020accessed\uE021' + _d65 + '\uE022' : '')].filter(v => v !== '').join(": ")
|
|
942
|
+
const _v66 = (T["online"] != null ? (typeof T["online"] === 'string' ? T["online"] : (T["online"].single || '')) : '')
|
|
943
|
+
const _v69 = (T["available at"] != null ? (typeof T["available at"] === 'string' ? T["available at"] : (T["available at"].single || '')) : '')
|
|
944
|
+
const _v70 = (item.URL != null && item.URL !== '' ? String(item.URL) : '')
|
|
945
|
+
const _g67 = ((item.URL == null || item.URL === '')) ? '' : [applyTextCase(_v69, "capitalize-first"), (stripNocaseSpans(_v70) ? '\uE020URL\uE021' + stripNocaseSpans(_v70) + '\uE022' : '')].filter(v => v !== '').join(": ")
|
|
946
|
+
const _g60 = ((item.accessed == null || item.accessed === '') && (item.URL == null || item.URL === '')) ? '' : [_g62, (applyTextCase(_v66, "capitalize-first") ? "[" + applyTextCase(_v66, "capitalize-first") + "]" : ''), _g67].filter(v => v !== '').join(". ")
|
|
947
|
+
_ch59 = (_g60 ? " " + _g60 : '')
|
|
948
|
+
}
|
|
949
|
+
_ch58 = _ch59
|
|
950
|
+
}
|
|
951
|
+
else if ((item.DOI != null && item.DOI !== '')) {
|
|
952
|
+
const _v71 = (item.DOI != null && item.DOI !== '' ? String(item.DOI) : '')
|
|
953
|
+
_ch58 = ((stripNocaseSpans(_v71) ? " doi: " + stripNocaseSpans(_v71) + "." : '') ? '\uE020DOI\uE021' + (stripNocaseSpans(_v71) ? " doi: " + stripNocaseSpans(_v71) + "." : '') + '\uE022' : '')
|
|
954
|
+
}
|
|
955
|
+
else if ((item.URL != null && item.URL !== '')) {
|
|
956
|
+
const _v76 = (T["accessed"] != null ? (typeof T["accessed"] === 'string' ? T["accessed"] : (T["accessed"].single || '')) : '')
|
|
957
|
+
const _d77 = item.accessed ? formatDate(item.accessed, {"dateParts":[{"name":"month","form":null,"prefix":"","suffix":" ","rangeDelimiter":null},{"name":"day","form":null,"prefix":"","suffix":", ","rangeDelimiter":null},{"name":"year","form":null,"prefix":"","suffix":"","rangeDelimiter":null}],"monthTerms":{"1":"January","2":"February","3":"March","4":"April","5":"May","6":"June","7":"July","8":"August","9":"September","10":"October","11":"November","12":"December"},"seasonTerms":{"1":"Spring","2":"Summer","3":"Autumn","4":"Winter"}}) : ''
|
|
958
|
+
const _g74 = ((item.accessed == null || item.accessed === '')) ? '' : [applyTextCase(_v76, "capitalize-first"), (_d77 ? '\uE020accessed\uE021' + _d77 + '\uE022' : '')].filter(v => v !== '').join(": ")
|
|
959
|
+
const _gp79 = []
|
|
960
|
+
if ((item.medium != null && item.medium !== '')) {
|
|
961
|
+
const _v80 = (item.medium != null && item.medium !== '' ? String(item.medium) : '')
|
|
962
|
+
_gp79.push((applyTextCase(_v80, "capitalize-first") ? '\uE020medium\uE021' + applyTextCase(_v80, "capitalize-first") + '\uE022' : ''))
|
|
963
|
+
}
|
|
964
|
+
else {
|
|
965
|
+
const _v81 = (T["online"] != null ? (typeof T["online"] === 'string' ? T["online"] : (T["online"].single || '')) : '')
|
|
966
|
+
_gp79.push(applyTextCase(_v81, "capitalize-first"))
|
|
967
|
+
let _ch82 = ''
|
|
968
|
+
if (item.type === "motion_picture") {
|
|
969
|
+
const _v83 = (T["video"] != null ? (typeof T["video"] === 'string' ? T["video"] : (T["video"].single || '')) : '')
|
|
970
|
+
_ch82 = applyTextCase(_v83, "capitalize-first")
|
|
971
|
+
}
|
|
972
|
+
_gp79.push(_ch82)
|
|
973
|
+
}
|
|
974
|
+
const _g78 = _gp79.filter(v => v !== '').join(" ")
|
|
975
|
+
const _g72 = ((item.accessed == null || item.accessed === '') && (item.medium == null || item.medium === '')) ? '' : [_g74, (_g78 ? "[" + _g78 + "]" : '')].filter(v => v !== '').join(". ")
|
|
976
|
+
const _v86 = (T["available at"] != null ? (typeof T["available at"] === 'string' ? T["available at"] : (T["available at"].single || '')) : '')
|
|
977
|
+
const _v87 = (item.URL != null && item.URL !== '' ? String(item.URL) : '')
|
|
978
|
+
const _g84 = ((item.URL == null || item.URL === '')) ? '' : [applyTextCase(_v86, "capitalize-first"), (stripNocaseSpans(_v87) ? '\uE020URL\uE021' + stripNocaseSpans(_v87) + '\uE022' : '')].filter(v => v !== '').join(": ")
|
|
979
|
+
_ch58 = [(_g72 ? " " + _g72 + ". " : ''), (_g84 ? " " + _g84 : '')].filter(v => v !== '').join('')
|
|
980
|
+
}
|
|
981
|
+
return _ch58
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
function macro_page(item, ctx) {
|
|
985
|
+
let _ch88 = ''
|
|
986
|
+
if ((item.type === "article-journal" && (item.number != null && item.number !== ''))) {
|
|
987
|
+
const _v91 = "Art."
|
|
988
|
+
const _v92 = (T["issue:short"] != null ? (typeof T["issue:short"] === 'string' ? T["issue:short"] : (T["issue:short"].single || '')) : '')
|
|
989
|
+
const _v93 = (item.number != null && item.number !== '' ? String(item.number) : '')
|
|
990
|
+
const _g89 = ((item.number == null || item.number === '')) ? '' : [_v91, _v92, (stripNocaseSpans(_v93) ? '\uE020number\uE021' + stripNocaseSpans(_v93) + '\uE022' : '')].filter(v => v !== '').join(" ")
|
|
991
|
+
_ch88 = _g89
|
|
992
|
+
}
|
|
993
|
+
else {
|
|
994
|
+
const _v96 = (() => {
|
|
995
|
+
const _val = item.page
|
|
996
|
+
if (_val == null || _val === '' || (Array.isArray(_val) && _val.length === 0)) return ''
|
|
997
|
+
const _term = T["page:short"]
|
|
998
|
+
if (_term == null) return ''
|
|
999
|
+
if (typeof _term === 'string') return _term
|
|
1000
|
+
const _isPlural = typeof _val === 'string' ? /[-,&]/.test(_val) || /\d+\s*[-–]\s*\d+/.test(_val) : Array.isArray(_val) ? _val.length > 1 : Number(_val) !== 1
|
|
1001
|
+
return _isPlural ? (_term.multiple || _term.single || '') : (_term.single || '')
|
|
1002
|
+
})()
|
|
1003
|
+
const _v97 = (item.page != null && item.page !== '' ? String(item.page) : '')
|
|
1004
|
+
const _g94 = ((item.page == null || item.page === '')) ? '' : [_v96, (stripNocaseSpans(_v97) ? '\uE020page\uE021' + stripNocaseSpans(_v97) + '\uE022' : '')].filter(v => v !== '').join(" ")
|
|
1005
|
+
_ch88 = _g94
|
|
1006
|
+
}
|
|
1007
|
+
return _ch88
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
function macro_citation_locator(item, ctx) {
|
|
1011
|
+
const _gp99 = []
|
|
1012
|
+
if (ctx.locator === "page") {
|
|
1013
|
+
const _v100 = (() => {
|
|
1014
|
+
const _val = item.locator
|
|
1015
|
+
if (_val == null || _val === '' || (Array.isArray(_val) && _val.length === 0)) return ''
|
|
1016
|
+
const _term = T[(item._locatorLabel || 'page') + ":short"]
|
|
1017
|
+
if (_term == null) return ''
|
|
1018
|
+
if (typeof _term === 'string') return _term
|
|
1019
|
+
const _isPlural = typeof _val === 'string' ? /[-,&]/.test(_val) || /\d+\s*[-–]\s*\d+/.test(_val) : Array.isArray(_val) ? _val.length > 1 : Number(_val) !== 1
|
|
1020
|
+
return _isPlural ? (_term.multiple || _term.single || '') : (_term.single || '')
|
|
1021
|
+
})()
|
|
1022
|
+
_gp99.push(_v100)
|
|
1023
|
+
}
|
|
1024
|
+
else {
|
|
1025
|
+
const _v101 = (() => {
|
|
1026
|
+
const _val = item.locator
|
|
1027
|
+
if (_val == null || _val === '' || (Array.isArray(_val) && _val.length === 0)) return ''
|
|
1028
|
+
const _term = T[(item._locatorLabel || 'page') + ":short"]
|
|
1029
|
+
if (_term == null) return ''
|
|
1030
|
+
if (typeof _term === 'string') return _term
|
|
1031
|
+
const _isPlural = typeof _val === 'string' ? /[-,&]/.test(_val) || /\d+\s*[-–]\s*\d+/.test(_val) : Array.isArray(_val) ? _val.length > 1 : Number(_val) !== 1
|
|
1032
|
+
return _isPlural ? (_term.multiple || _term.single || '') : (_term.single || '')
|
|
1033
|
+
})()
|
|
1034
|
+
_gp99.push(applyTextCase(_v101, "capitalize-first"))
|
|
1035
|
+
}
|
|
1036
|
+
const _v102 = (item.locator != null && item.locator !== '' ? String(item.locator) : '')
|
|
1037
|
+
_gp99.push((stripNocaseSpans(_v102) ? '\uE020locator\uE021' + stripNocaseSpans(_v102) + '\uE022' : ''))
|
|
1038
|
+
const _g98 = _gp99.filter(v => v !== '').join(" ")
|
|
1039
|
+
return _g98
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
function macro_geographic_location(item, ctx) {
|
|
1043
|
+
const _gp104 = []
|
|
1044
|
+
if ((item["publisher-place"] != null && item["publisher-place"] !== '')) {
|
|
1045
|
+
const _v105 = (item["publisher-place"] != null && item["publisher-place"] !== '' ? String(item["publisher-place"]) : '')
|
|
1046
|
+
_gp104.push((applyTextCase(_v105, "title") ? '\uE020publisher-place\uE021' + applyTextCase(_v105, "title") + '\uE022' : ''))
|
|
1047
|
+
}
|
|
1048
|
+
else if ((item["event-place"] != null && item["event-place"] !== '')) {
|
|
1049
|
+
const _v106 = (item["event-place"] != null && item["event-place"] !== '' ? String(item["event-place"]) : '')
|
|
1050
|
+
_gp104.push((applyTextCase(_v106, "title") ? '\uE020event-place\uE021' + applyTextCase(_v106, "title") + '\uE022' : ''))
|
|
1051
|
+
}
|
|
1052
|
+
const _g103 = _gp104.filter(v => v !== '').join(", ")
|
|
1053
|
+
return (_g103 ? _g103 + "." : '')
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
function macro_collection(item, ctx) {
|
|
1057
|
+
let _ch107 = ''
|
|
1058
|
+
if ((item["collection-title"] != null && item["collection-title"] !== '')) {
|
|
1059
|
+
const _v108 = (T["in"] != null ? (typeof T["in"] === 'string' ? T["in"] : (T["in"].single || '')) : '')
|
|
1060
|
+
const _v111 = (item["collection-title"] != null && item["collection-title"] !== '' ? String(item["collection-title"]) : '')
|
|
1061
|
+
const _v112 = (item["collection-number"] != null && item["collection-number"] !== '' ? String(item["collection-number"]) : '')
|
|
1062
|
+
const _v113 = (item.volume != null && item.volume !== '' ? String(item.volume) : '')
|
|
1063
|
+
const _g109 = ((item["collection-title"] == null || item["collection-title"] === '') && (item["collection-number"] == null || item["collection-number"] === '') && (item.volume == null || item.volume === '')) ? '' : [(stripNocaseSpans(_v111) ? '\uE020collection-title\uE021' + stripNocaseSpans(_v111) + '\uE022' : ''), ((stripNocaseSpans(_v112) ? "no. " + stripNocaseSpans(_v112) : '') ? '\uE020collection-number\uE021' + (stripNocaseSpans(_v112) ? "no. " + stripNocaseSpans(_v112) : '') + '\uE022' : ''), ((stripNocaseSpans(_v113) ? "vol. " + stripNocaseSpans(_v113) : '') ? '\uE020volume\uE021' + (stripNocaseSpans(_v113) ? "vol. " + stripNocaseSpans(_v113) : '') + '\uE022' : '')].filter(v => v !== '').join(", ")
|
|
1064
|
+
_ch107 = [(_v108 ? _v108 + " " : ''), (_g109 ? _g109 + ". " : '')].filter(v => v !== '').join('')
|
|
1065
|
+
}
|
|
1066
|
+
return _ch107
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
const BIB_NAME_OPTS = {}
|
|
1070
|
+
|
|
1071
|
+
export function bibliography(item, ctx = {}) {
|
|
1072
|
+
ctx = { ...ctx, _secOpts: BIB_NAME_OPTS }
|
|
1073
|
+
const _v114 = (item["citation-number"] != null && item["citation-number"] !== '' ? String(item["citation-number"]) : '')
|
|
1074
|
+
const _v115 = macro_author(item, ctx)
|
|
1075
|
+
let _ch116 = ''
|
|
1076
|
+
if (item.type === "article-journal") {
|
|
1077
|
+
const _v119 = macro_title(item, ctx)
|
|
1078
|
+
const _v120 = (item["container-title"] != null && item["container-title"] !== '' ? String(item["container-title"]) : '')
|
|
1079
|
+
const _v121 = macro_locators(item, ctx)
|
|
1080
|
+
const _v122 = macro_page(item, ctx)
|
|
1081
|
+
const _v123 = macro_issued(item, ctx)
|
|
1082
|
+
const _v124 = macro_status(item, ctx)
|
|
1083
|
+
const _g117 = (!macro_title(item, ctx) && (item["container-title"] == null || item["container-title"] === '') && !macro_locators(item, ctx) && !macro_page(item, ctx) && !macro_issued(item, ctx) && !macro_status(item, ctx)) ? '' : [_v119, ((stripNocaseSpans(_v120) ? '\uE000' + stripNocaseSpans(_v120) + '\uE001' : '') ? '\uE020container-title\uE021' + (stripNocaseSpans(_v120) ? '\uE000' + stripNocaseSpans(_v120) + '\uE001' : '') + '\uE022' : ''), _v121, _v122, _v123, _v124].filter(v => v !== '').join(", ")
|
|
1084
|
+
let _ch125 = ''
|
|
1085
|
+
if (!((item.URL != null && item.URL !== '')) && !((item.DOI != null && item.DOI !== ''))) {
|
|
1086
|
+
const _v126 = "."
|
|
1087
|
+
_ch125 = _v126
|
|
1088
|
+
}
|
|
1089
|
+
else {
|
|
1090
|
+
const _v127 = ","
|
|
1091
|
+
_ch125 = _v127
|
|
1092
|
+
}
|
|
1093
|
+
const _v128 = macro_access(item, ctx)
|
|
1094
|
+
_ch116 = [_g117, _ch125, _v128].filter(v => v !== '').join('')
|
|
1095
|
+
}
|
|
1096
|
+
else if ((item.type === "paper-conference" || item.type === "speech")) {
|
|
1097
|
+
const _v131 = macro_title(item, ctx)
|
|
1098
|
+
const _v132 = macro_event(item, ctx)
|
|
1099
|
+
const _v133 = macro_editor(item, ctx)
|
|
1100
|
+
const _g129 = (!macro_title(item, ctx) && !macro_event(item, ctx) && !macro_editor(item, ctx)) ? '' : [_v131, _v132, _v133].filter(v => v !== '').join(", ")
|
|
1101
|
+
const _v134 = macro_collection(item, ctx)
|
|
1102
|
+
const _v137 = macro_publisher(item, ctx)
|
|
1103
|
+
const _v138 = macro_issued(item, ctx)
|
|
1104
|
+
const _v139 = macro_page(item, ctx)
|
|
1105
|
+
const _v140 = macro_status(item, ctx)
|
|
1106
|
+
const _g135 = (!macro_publisher(item, ctx) && !macro_issued(item, ctx) && !macro_page(item, ctx) && !macro_status(item, ctx)) ? '' : [_v137, _v138, _v139, _v140].filter(v => v !== '').join(", ")
|
|
1107
|
+
const _v141 = macro_access(item, ctx)
|
|
1108
|
+
_ch116 = [(_g129 ? _g129 + ", " : ''), _v134, (_g135 ? _g135 + "." : ''), _v141].filter(v => v !== '').join('')
|
|
1109
|
+
}
|
|
1110
|
+
else if (item.type === "chapter") {
|
|
1111
|
+
const _v144 = macro_title(item, ctx)
|
|
1112
|
+
const _v147 = (T["in"] != null ? (typeof T["in"] === 'string' ? T["in"] : (T["in"].single || '')) : '')
|
|
1113
|
+
const _v148 = (item["container-title"] != null && item["container-title"] !== '' ? String(item["container-title"]) : '')
|
|
1114
|
+
const _g145 = ((item["container-title"] == null || item["container-title"] === '')) ? '' : [(_v147 ? _v147 + " " : ''), ((stripNocaseSpans(_v148) ? '\uE000' + stripNocaseSpans(_v148) + '\uE001' : '') ? '\uE020container-title\uE021' + (stripNocaseSpans(_v148) ? '\uE000' + stripNocaseSpans(_v148) + '\uE001' : '') + '\uE022' : '')].filter(v => v !== '').join(" ")
|
|
1115
|
+
const _v149 = macro_locators(item, ctx)
|
|
1116
|
+
const _v150 = macro_editor(item, ctx)
|
|
1117
|
+
const _v151 = macro_collection(item, ctx)
|
|
1118
|
+
const _v152 = macro_publisher(item, ctx)
|
|
1119
|
+
const _v153 = macro_issued(item, ctx)
|
|
1120
|
+
const _v156 = (() => {
|
|
1121
|
+
const _val = item["chapter-number"]
|
|
1122
|
+
if (_val == null || _val === '' || (Array.isArray(_val) && _val.length === 0)) return ''
|
|
1123
|
+
const _term = T["chapter:short"]
|
|
1124
|
+
if (_term == null) return ''
|
|
1125
|
+
if (typeof _term === 'string') return _term
|
|
1126
|
+
const _isPlural = typeof _val === 'string' ? /[-,&]/.test(_val) || /\d+\s*[-–]\s*\d+/.test(_val) : Array.isArray(_val) ? _val.length > 1 : Number(_val) !== 1
|
|
1127
|
+
return _isPlural ? (_term.multiple || _term.single || '') : (_term.single || '')
|
|
1128
|
+
})()
|
|
1129
|
+
const _v157 = (item["chapter-number"] != null && item["chapter-number"] !== '' ? String(item["chapter-number"]) : '')
|
|
1130
|
+
const _g154 = ((item["chapter-number"] == null || item["chapter-number"] === '')) ? '' : [_v156, (stripNocaseSpans(_v157) ? '\uE020chapter-number\uE021' + stripNocaseSpans(_v157) + '\uE022' : '')].filter(v => v !== '').join(" ")
|
|
1131
|
+
const _v158 = macro_page(item, ctx)
|
|
1132
|
+
const _g142 = (!macro_title(item, ctx) && (item["container-title"] == null || item["container-title"] === '') && !macro_locators(item, ctx) && !macro_editor(item, ctx) && !macro_collection(item, ctx) && !macro_publisher(item, ctx) && !macro_issued(item, ctx) && (item["chapter-number"] == null || item["chapter-number"] === '') && !macro_page(item, ctx)) ? '' : [_v144, _g145, _v149, _v150, _v151, _v152, _v153, _g154, _v158].filter(v => v !== '').join(", ")
|
|
1133
|
+
const _v159 = macro_access(item, ctx)
|
|
1134
|
+
_ch116 = [(_g142 ? _g142 + "." : ''), _v159].filter(v => v !== '').join('')
|
|
1135
|
+
}
|
|
1136
|
+
else if (item.type === "report") {
|
|
1137
|
+
const _v162 = macro_title(item, ctx)
|
|
1138
|
+
const _v163 = macro_publisher(item, ctx)
|
|
1139
|
+
const _v166 = (item.genre != null && item.genre !== '' ? String(item.genre) : '')
|
|
1140
|
+
const _v167 = (item.number != null && item.number !== '' ? String(item.number) : '')
|
|
1141
|
+
const _g164 = ((item.genre == null || item.genre === '') && (item.number == null || item.number === '')) ? '' : [(stripNocaseSpans(_v166) ? '\uE020genre\uE021' + stripNocaseSpans(_v166) + '\uE022' : ''), (stripNocaseSpans(_v167) ? '\uE020number\uE021' + stripNocaseSpans(_v167) + '\uE022' : '')].filter(v => v !== '').join(" ")
|
|
1142
|
+
const _v168 = macro_issued(item, ctx)
|
|
1143
|
+
const _g160 = (!macro_title(item, ctx) && !macro_publisher(item, ctx) && (item.genre == null || item.genre === '') && (item.number == null || item.number === '') && !macro_issued(item, ctx)) ? '' : [_v162, _v163, _g164, _v168].filter(v => v !== '').join(", ")
|
|
1144
|
+
const _v169 = macro_access(item, ctx)
|
|
1145
|
+
_ch116 = [(_g160 ? _g160 + "." : ''), _v169].filter(v => v !== '').join('')
|
|
1146
|
+
}
|
|
1147
|
+
else if (item.type === "thesis") {
|
|
1148
|
+
const _v172 = macro_title(item, ctx)
|
|
1149
|
+
const _v173 = (item.genre != null && item.genre !== '' ? String(item.genre) : '')
|
|
1150
|
+
const _v174 = macro_publisher(item, ctx)
|
|
1151
|
+
const _v175 = macro_issued(item, ctx)
|
|
1152
|
+
const _g170 = (!macro_title(item, ctx) && (item.genre == null || item.genre === '') && !macro_publisher(item, ctx) && !macro_issued(item, ctx)) ? '' : [_v172, (stripNocaseSpans(_v173) ? '\uE020genre\uE021' + stripNocaseSpans(_v173) + '\uE022' : ''), _v174, _v175].filter(v => v !== '').join(", ")
|
|
1153
|
+
const _v176 = macro_access(item, ctx)
|
|
1154
|
+
_ch116 = [(_g170 ? _g170 + "." : ''), _v176].filter(v => v !== '').join('')
|
|
1155
|
+
}
|
|
1156
|
+
else if (item.type === "software") {
|
|
1157
|
+
const _v179 = macro_title(item, ctx)
|
|
1158
|
+
const _v180 = macro_issued(item, ctx)
|
|
1159
|
+
const _v181 = (item.genre != null && item.genre !== '' ? String(item.genre) : '')
|
|
1160
|
+
const _v182 = macro_publisher(item, ctx)
|
|
1161
|
+
const _g177 = (!macro_title(item, ctx) && !macro_issued(item, ctx) && (item.genre == null || item.genre === '') && !macro_publisher(item, ctx)) ? '' : [_v179, (_v180 ? "(" + _v180 + ")" : ''), (stripNocaseSpans(_v181) ? '\uE020genre\uE021' + stripNocaseSpans(_v181) + '\uE022' : ''), _v182].filter(v => v !== '').join(". ")
|
|
1162
|
+
const _v183 = macro_access(item, ctx)
|
|
1163
|
+
_ch116 = [(_g177 ? _g177 + "." : ''), _v183].filter(v => v !== '').join('')
|
|
1164
|
+
}
|
|
1165
|
+
else if (item.type === "article") {
|
|
1166
|
+
const _v186 = macro_title(item, ctx)
|
|
1167
|
+
const _v187 = macro_issued(item, ctx)
|
|
1168
|
+
const _v190 = macro_publisher(item, ctx)
|
|
1169
|
+
const _v191 = (item.number != null && item.number !== '' ? String(item.number) : '')
|
|
1170
|
+
const _g188 = (!macro_publisher(item, ctx) && (item.number == null || item.number === '')) ? '' : [(_v190 ? '\uE000' + _v190 + '\uE001' : ''), (stripNocaseSpans(_v191) ? '\uE020number\uE021' + stripNocaseSpans(_v191) + '\uE022' : '')].filter(v => v !== '').join(": ")
|
|
1171
|
+
const _g184 = (!macro_title(item, ctx) && !macro_issued(item, ctx) && !macro_publisher(item, ctx) && (item.number == null || item.number === '')) ? '' : [_v186, _v187, _g188].filter(v => v !== '').join(", ")
|
|
1172
|
+
const _v192 = macro_access(item, ctx)
|
|
1173
|
+
_ch116 = [(_g184 ? _g184 + "." : ''), _v192].filter(v => v !== '').join('')
|
|
1174
|
+
}
|
|
1175
|
+
else if ((item.type === "webpage" || item.type === "post-weblog" || item.type === "post")) {
|
|
1176
|
+
const _v195 = macro_title(item, ctx)
|
|
1177
|
+
const _v196 = (item["container-title"] != null && item["container-title"] !== '' ? String(item["container-title"]) : '')
|
|
1178
|
+
const _g193 = (!macro_title(item, ctx) && (item["container-title"] == null || item["container-title"] === '')) ? '' : [_v195, (stripNocaseSpans(_v196) ? '\uE020container-title\uE021' + stripNocaseSpans(_v196) + '\uE022' : '')].filter(v => v !== '').join(", ")
|
|
1179
|
+
const _v197 = macro_access(item, ctx)
|
|
1180
|
+
_ch116 = [(_g193 ? _g193 + "." : ''), _v197].filter(v => v !== '').join('')
|
|
1181
|
+
}
|
|
1182
|
+
else if (item.type === "patent") {
|
|
1183
|
+
const _v200 = macro_title(item, ctx)
|
|
1184
|
+
const _v201 = (item.number != null && item.number !== '' ? String(item.number) : '')
|
|
1185
|
+
const _v202 = macro_issued(item, ctx)
|
|
1186
|
+
const _g198 = (!macro_title(item, ctx) && (item.number == null || item.number === '') && !macro_issued(item, ctx)) ? '' : [_v200, (stripNocaseSpans(_v201) ? '\uE020number\uE021' + stripNocaseSpans(_v201) + '\uE022' : ''), _v202].filter(v => v !== '').join(", ")
|
|
1187
|
+
const _v203 = macro_access(item, ctx)
|
|
1188
|
+
_ch116 = [_g198, _v203].filter(v => v !== '').join('')
|
|
1189
|
+
}
|
|
1190
|
+
else if (item.type === "motion_picture") {
|
|
1191
|
+
const _v204 = macro_geographic_location(item, ctx)
|
|
1192
|
+
const _v207 = macro_title(item, ctx)
|
|
1193
|
+
const _v208 = macro_issued(item, ctx)
|
|
1194
|
+
const _g205 = (!macro_title(item, ctx) && !macro_issued(item, ctx)) ? '' : [_v207, _v208].filter(v => v !== '').join(", ")
|
|
1195
|
+
const _v209 = macro_access(item, ctx)
|
|
1196
|
+
_ch116 = [(_v204 ? _v204 + ". " : ''), (_g205 ? _g205 + "." : ''), _v209].filter(v => v !== '').join('')
|
|
1197
|
+
}
|
|
1198
|
+
else if (item.type === "standard") {
|
|
1199
|
+
const _v212 = macro_title(item, ctx)
|
|
1200
|
+
const _v215 = (item.genre != null && item.genre !== '' ? String(item.genre) : '')
|
|
1201
|
+
const _v216 = (item.number != null && item.number !== '' ? String(item.number) : '')
|
|
1202
|
+
const _g213 = ((item.genre == null || item.genre === '') && (item.number == null || item.number === '')) ? '' : [(stripNocaseSpans(_v215) ? '\uE020genre\uE021' + stripNocaseSpans(_v215) + '\uE022' : ''), (stripNocaseSpans(_v216) ? '\uE020number\uE021' + stripNocaseSpans(_v216) + '\uE022' : '')].filter(v => v !== '').join(" ")
|
|
1203
|
+
const _v217 = macro_geographic_location(item, ctx)
|
|
1204
|
+
const _v218 = macro_issued(item, ctx)
|
|
1205
|
+
const _g210 = (!macro_title(item, ctx) && (item.genre == null || item.genre === '') && (item.number == null || item.number === '') && !macro_geographic_location(item, ctx) && !macro_issued(item, ctx)) ? '' : [_v212, _g213, _v217, _v218].filter(v => v !== '').join(", ")
|
|
1206
|
+
const _v219 = macro_access(item, ctx)
|
|
1207
|
+
_ch116 = [(_g210 ? _g210 + "." : ''), _v219].filter(v => v !== '').join('')
|
|
1208
|
+
}
|
|
1209
|
+
else if ((item.type === "bill" || item.type === "book" || item.type === "graphic" || item.type === "legal_case" || item.type === "legislation" || item.type === "report" || item.type === "song")) {
|
|
1210
|
+
const _v222 = macro_title(item, ctx)
|
|
1211
|
+
const _v223 = macro_locators(item, ctx)
|
|
1212
|
+
const _g220 = (!macro_title(item, ctx) && !macro_locators(item, ctx)) ? '' : [_v222, _v223].filter(v => v !== '').join(", ")
|
|
1213
|
+
const _v224 = macro_collection(item, ctx)
|
|
1214
|
+
const _v227 = macro_publisher(item, ctx)
|
|
1215
|
+
const _v228 = macro_issued(item, ctx)
|
|
1216
|
+
const _v229 = macro_page(item, ctx)
|
|
1217
|
+
const _g225 = (!macro_publisher(item, ctx) && !macro_issued(item, ctx) && !macro_page(item, ctx)) ? '' : [_v227, _v228, _v229].filter(v => v !== '').join(", ")
|
|
1218
|
+
const _v230 = macro_access(item, ctx)
|
|
1219
|
+
_ch116 = [(_g220 ? _g220 + ". " : ''), _v224, (_g225 ? _g225 + "." : ''), _v230].filter(v => v !== '').join('')
|
|
1220
|
+
}
|
|
1221
|
+
else if ((item.type === "article-magazine" || item.type === "article-newspaper" || item.type === "broadcast" || item.type === "interview" || item.type === "manuscript" || item.type === "map" || item.type === "patent" || item.type === "personal_communication" || item.type === "song" || item.type === "speech" || item.type === "thesis" || item.type === "webpage")) {
|
|
1222
|
+
const _v233 = macro_title(item, ctx)
|
|
1223
|
+
const _v234 = (item["container-title"] != null && item["container-title"] !== '' ? String(item["container-title"]) : '')
|
|
1224
|
+
const _v235 = macro_locators(item, ctx)
|
|
1225
|
+
const _v236 = macro_publisher(item, ctx)
|
|
1226
|
+
const _v237 = macro_page(item, ctx)
|
|
1227
|
+
const _v238 = macro_issued(item, ctx)
|
|
1228
|
+
const _g231 = (!macro_title(item, ctx) && (item["container-title"] == null || item["container-title"] === '') && !macro_locators(item, ctx) && !macro_publisher(item, ctx) && !macro_page(item, ctx) && !macro_issued(item, ctx)) ? '' : [_v233, ((stripNocaseSpans(_v234) ? '\uE000' + stripNocaseSpans(_v234) + '\uE001' : '') ? '\uE020container-title\uE021' + (stripNocaseSpans(_v234) ? '\uE000' + stripNocaseSpans(_v234) + '\uE001' : '') + '\uE022' : ''), _v235, _v236, _v237, _v238].filter(v => v !== '').join(", ")
|
|
1229
|
+
const _v239 = macro_access(item, ctx)
|
|
1230
|
+
_ch116 = [(_g231 ? _g231 + "." : ''), _v239].filter(v => v !== '').join('')
|
|
1231
|
+
}
|
|
1232
|
+
else {
|
|
1233
|
+
const _v242 = macro_title(item, ctx)
|
|
1234
|
+
const _v243 = (item["container-title"] != null && item["container-title"] !== '' ? String(item["container-title"]) : '')
|
|
1235
|
+
const _v244 = macro_locators(item, ctx)
|
|
1236
|
+
const _g240 = (!macro_title(item, ctx) && (item["container-title"] == null || item["container-title"] === '') && !macro_locators(item, ctx)) ? '' : [_v242, ((stripNocaseSpans(_v243) ? '\uE000' + stripNocaseSpans(_v243) + '\uE001' : '') ? '\uE020container-title\uE021' + (stripNocaseSpans(_v243) ? '\uE000' + stripNocaseSpans(_v243) + '\uE001' : '') + '\uE022' : ''), _v244].filter(v => v !== '').join(", ")
|
|
1237
|
+
const _v245 = macro_collection(item, ctx)
|
|
1238
|
+
const _v248 = macro_publisher(item, ctx)
|
|
1239
|
+
const _v249 = macro_page(item, ctx)
|
|
1240
|
+
const _v250 = macro_issued(item, ctx)
|
|
1241
|
+
const _g246 = (!macro_publisher(item, ctx) && !macro_page(item, ctx) && !macro_issued(item, ctx)) ? '' : [_v248, _v249, _v250].filter(v => v !== '').join(", ")
|
|
1242
|
+
const _v251 = macro_access(item, ctx)
|
|
1243
|
+
_ch116 = [(_g240 ? _g240 + ". " : ''), _v245, (_g246 ? _g246 + "." : ''), _v251].filter(v => v !== '').join('')
|
|
1244
|
+
}
|
|
1245
|
+
const _first = ((stripNocaseSpans(_v114) ? "[" + stripNocaseSpans(_v114) + "]" : '') ? '\uE020citation-number\uE021' + (stripNocaseSpans(_v114) ? "[" + stripNocaseSpans(_v114) + "]" : '') + '\uE022' : '')
|
|
1246
|
+
const _rest = [(_v115 ? _v115 + ", " : ''), _ch116].filter(v => v !== '').join("")
|
|
1247
|
+
const _raw = (_first ? _first + (/\s[\uE000-\uE007\uE020-\uE022]*$/.test(_first) ? '' : ' ') : '') + _rest
|
|
1248
|
+
const _norm = _normalizePunctuation(_raw)
|
|
1249
|
+
const text = stripFormatting(_norm)
|
|
1250
|
+
const html = '<div class="csl-entry">' + toHtml(_norm) + '</div>'
|
|
1251
|
+
return {
|
|
1252
|
+
text,
|
|
1253
|
+
html,
|
|
1254
|
+
parts: _extractParts(item),
|
|
1255
|
+
links: _extractLinks(item),
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
function _extractParts(item) {
|
|
1260
|
+
return {
|
|
1261
|
+
authors: item.author || [],
|
|
1262
|
+
year: item.issued?.['date-parts']?.[0]?.[0]?.toString() || '',
|
|
1263
|
+
title: item.title || '',
|
|
1264
|
+
container: item['container-title'] || '',
|
|
1265
|
+
volume: item.volume?.toString() || '',
|
|
1266
|
+
issue: item.issue?.toString() || '',
|
|
1267
|
+
pages: item.page || '',
|
|
1268
|
+
doi: item.DOI || '',
|
|
1269
|
+
url: item.URL || '',
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
function _extractLinks(item) {
|
|
1274
|
+
return {
|
|
1275
|
+
doi: item.DOI ? 'https://doi.org/' + item.DOI : null,
|
|
1276
|
+
url: item.URL || null,
|
|
1277
|
+
pdf: item.extended?.pdf_url || null,
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
function _normalizePunctuation(str) {
|
|
1282
|
+
if (!str) return ''
|
|
1283
|
+
// F matches PUA tokens (formatting U+E000-E007 and semantic U+E020-E022) that may appear between dots
|
|
1284
|
+
const F = '[\uE000-\uE007\uE020-\uE022]*'
|
|
1285
|
+
return str
|
|
1286
|
+
.replace(new RegExp('([.!?])(' + F + ')\\. ', 'g'), '$1$2 ')
|
|
1287
|
+
.replace(new RegExp('\\.(' + F + ')\\.', 'g'), '.$1')
|
|
1288
|
+
.replace(/ +/g, ' ')
|
|
1289
|
+
.trim()
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
|
|
1293
|
+
const CIT_NAME_OPTS = {}
|
|
1294
|
+
|
|
1295
|
+
export function citation(cites, ctx = {}) {
|
|
1296
|
+
const _outerCtx = { ...ctx, _secOpts: CIT_NAME_OPTS }
|
|
1297
|
+
const rendered = cites.map(cite => {
|
|
1298
|
+
let ctx = cite._disambig ? { ..._outerCtx, _disambig: cite._disambig } : _outerCtx
|
|
1299
|
+
let item = cite.item || cite
|
|
1300
|
+
if (cite.locator != null) { item = { ...item, locator: cite.locator, _locatorLabel: cite.label || 'page' } }
|
|
1301
|
+
const _v254 = (item["citation-number"] != null && item["citation-number"] !== '' ? String(item["citation-number"]) : '')
|
|
1302
|
+
const _v255 = macro_citation_locator(item, ctx)
|
|
1303
|
+
const _g252 = ((item["citation-number"] == null || item["citation-number"] === '') && !macro_citation_locator(item, ctx)) ? '' : [(stripNocaseSpans(_v254) ? '\uE020citation-number\uE021' + stripNocaseSpans(_v254) + '\uE022' : ''), _v255].filter(v => v !== '').join(", ")
|
|
1304
|
+
return [(_g252 ? "[" + _g252 + "]" : '')].filter(v => v !== '').join('')
|
|
1305
|
+
})
|
|
1306
|
+
const _raw = rendered.join(", ")
|
|
1307
|
+
const text = stripFormatting(_raw)
|
|
1308
|
+
const html = '<span class="csl-citation">' + toHtml(_raw) + '</span>'
|
|
1309
|
+
return { text, html }
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
function _resolveTerm(key) {
|
|
1313
|
+
const val = T[key]
|
|
1314
|
+
if (val == null) return null
|
|
1315
|
+
return typeof val === 'string' ? val : val.single || ''
|
|
1316
|
+
}
|