;ELC   
;;; Compiled
;;; in Emacs version 28.2
;;; with all optimizations.



(byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\306\307\310\311\312DD\313\314\315\316\317\320\321\322\323&\210\306\324\310\311\325DD\326\314\315\316\327\320\330\322\331&\210\306\332\310\311\333DD\334\314\315\316\335\320\336\322\337&\210\306\340\310\311\341DD\342\314\315\316\343\320\336\322\337&\210\306\344\310\311\345DD\346\314\315\316\347\320\330\322\331&\210\306\350\310\311\351DD\352\314\315\316\353\320\354\322\355&\207" [require bibtex json map oc seq custom-declare-variable org-cite-basic-sorting-field funcall function #[0 "\300\207" [author] 1 #1=""] "Field used to sort bibliography items as a symbol, or nil." :group org-cite :package-version (Org . "9.5") :type symbol :safe symbolp org-cite-basic-author-year-separator #[0 "\300\207" [", "] 1 #1#] "String used to separate cites in an author-year configuration." (Org . "9.5") string stringp org-cite-basic-max-key-distance #[0 "\300\207" [2] 1 #1#] "Maximum (Levenshtein) distance between a wrong key and its suggestions." (Org . "9.5") integer integerp org-cite-basic-author-column-end #[0 "\300\207" [25] 1 #1#] "Column where author field ends in completion table, as an integer." (Org . "9.5") org-cite-basic-column-separator #[0 "\300\207" ["  "] 1 #1#] "Column separator in completion table, as a string." (Org . "9.5") org-cite-basic-mouse-over-key-face #[0 "\300\207" [highlight] 1 #1#] "Face used when mouse is over a citation key." (Org . "9.5") face facep] 12)
#@336 Cache for parsed bibliography files.

This is an association list following the pattern:

  (FILE-ID . ENTRIES)

FILE-ID is a cons cell (FILE . HASH), with FILE being the absolute file name of
the bibliography file, and HASH a hash of its contents.

ENTRIES is a hash table with citation references as keys and fields alist as
values.
(defvar org-cite-basic--bibliography-cache nil (#$ . 1558))
#@59 Cache for key completion table.

This is an a hash-table.
(defvar org-cite-basic--completion-cache (make-hash-table :test 'equal) (#$ . 1959))
#@124 Parse JSON entries in the current buffer.
Return a hash table with citation references as keys and fields alist as values.
(defalias 'org-cite-basic--parse-json #[0 "\302\303\304\"\305\306\307 \211\203# \211@\310\311\236A\312\313\"#\210A\266\202\202\n \210*\207" [json-key-type json-array-type make-hash-table :test equal list symbol json-read puthash id mapcar #[257 "\211\242\243\300\267\202` \301\302\303\304#B\207\305\306\"\206$ \305\307\"\206$ \305\310\"\311:\203M @@\211\247\2038 \312!\202H \211;\203A \211\202H \313\314\315!#\262\202^ ;\203Z \316\317\320#\202^ \313\321\"B\207B\207" [#s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (author 10 issued 18)) author mapconcat #[257 "\300\301\"\302\300\303\"Q\207" [alist-get family " " given] 6 "\n\n(fn ALIST)"] " and " alist-get date-parts literal raw year number-to-string error "First element of CSL-JSON date-parts should be a number or string, got %s: %S" type-of replace-regexp-in-string "[^z-a]*?\\(?1:[[:digit:]]\\{4\\}\\)[^z-a]*" "\\1" "Unknown CSL-JSON date format: %S"] 10 "\n\n(fn ARG0)"]] 8 (#$ . 2109)])
#@199 Parse BibTeX entries in the current buffer.
DIALECT is the BibTeX dialect used.  See `bibtex-dialect'.
Return a hash table with citation references as keys and fields alist as values.

(fn DIALECT)
(defalias 'org-cite-basic--parse-bibtex #[257 "\301\302\303\"\304\305\304\"\210\306\307\310\"!\210)\207" [bibtex-sort-ignore-string-entries make-hash-table :test equal t bibtex-set-dialect bibtex-map-entries make-closure #[385 "\301\302\303\304\"\305\306!\"\300#\207" [V0 puthash mapcar make-closure #[257 "\211\242\243\301\267\202 \302\300B\207\303B\207\304\227!\305\306\307#B\207" [V0 #s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("=key=" 10 "=type=" 14)) id type intern replace-regexp-in-string "[ 	\n]+" " "] 8 "\n\n(fn ARG0)"] bibtex-parse-entry t] 8 "\n\n(fn KEY &rest _)"]] 6 (#$ . 3250)])
#@41 Hash table linking files to their hash.
(defvar org-cite-basic--file-id-cache nil (#$ . 4106))
#@390 List all entries available in the buffer.

Each association follows the pattern

  (FILE . ENTRIES)

where FILE is the absolute file name of the BibTeX file, and ENTRIES is a hash
table where keys are references and values are association lists between fields,
as symbols, and values as strings or nil.

Optional argument INFO is the export state, as a property list.

(fn &optional INFO)
(defalias 'org-cite-basic--parse-bibliography #[256 "\302!\204 \303\304\305\"\306\307\"\203 \310\307\"\207\311\312 \211\203\225 \211@\313!\203\216 \314\315\316\"r\211q\210\317\320\"\216\321!\204@ \322\"\204K \323!\210\324\325 #\210\322\"B\326	\"A\206\202 \327!\211\330\267\202s \331 \202w \332\333!\202w \332\334!\202w \335\336\"\262B	B\211\262BB\262\266*\210A\266\202\202 \210\203\240 \337\307#\210\207" [org-cite-basic--file-id-cache org-cite-basic--bibliography-cache hash-table-p make-hash-table :test equal plist-member :cite-basic/bibliography plist-get nil org-cite-list-bibliography-files file-readable-p generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205	 \302\300!\207" [V0 buffer-name kill-buffer] 2] org-file-has-changed-p gethash insert-file-contents puthash org-buffer-hash assoc file-name-extension #s(hash-table size 3 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("json" 98 "bib" 103 "bibtex" 109)) org-cite-basic--parse-json org-cite-basic--parse-bibtex biblatex BibTeX user-error "Unknown bibliography extension: %S" plist-put] 10 (#$ . 4208)])
#@101 Return number associated to cited KEY.
INFO is the export state, as a property list.

(fn KEY INFO)
(defalias 'org-cite-basic--key-number #[514 "\301\"\302#\207" [org-cite-basic-sorting-field org-cite-basic--field-less-p org-cite-key-number] 7 (#$ . 5739)])
#@50 List all keys available in current bibliography.
(defalias 'org-cite-basic--all-keys #[0 "\300\301\302 \"\207" [seq-mapcat #[257 "\211\243\300!\207" [map-keys] 4 "\n\n(fn ARG0)"] org-cite-basic--parse-bibliography] 3 (#$ . 6008)])
#@139 Return BibTeX entry for KEY, as an association list.
When non-nil, INFO is the export state, as a property list.

(fn KEY &optional INFO)
(defalias 'org-cite-basic--get-entry #[513 "\3002( \301!\211\203% \211@\211\243\302\"\211\203 \303\300\"\210\266A\266\202\202 \210\3040\207" [:found org-cite-basic--parse-bibliography gethash throw nil] 9 (#$ . 6247)])
#@466 Return FIELD value for ENTRY-OR-KEY, or nil.

FIELD is a symbol.  ENTRY-OR-KEY is either an association list, as returned by
`org-cite-basic--get-entry', or a string representing a citation key.

Optional argument INFO is the export state, as a property list.

Return value may be nil or a string.  If current export back-end is derived
from `latex', return a raw string instead, unless optional argument RAW is
non-nil.

(fn FIELD ENTRY-OR-KEY &optional INFO RAW)
(defalias 'org-cite-basic--get-field #[1026 ";\203 \300\"\202 :\203 \202 \301\302\"\236A\211\2032 \2042 \303\304\305\"\306\"\2032 \307!\207\207" [org-cite-basic--get-entry error "Wrong value for ENTRY-OR-KEY: %S" org-export-derived-backend-p plist-get :back-end latex org-export-raw-string] 9 (#$ . 6619)])
#@81 Compute suffix associated to number N.
This is used for disambiguation.

(fn N)
(defalias 'org-cite-basic--number-to-suffix #[257 "\300\301\302\303\304\3052J \306\246B\262\306\245\262\307U\203$ \310\305\"\210\202	 \311W\2037 \310\305SB\"\210\202	 \311U\203	 \310\305\307\211BB\"\210\202	 \"\"\207" [nil apply string mapcar #[257 "\300\\\207" [97] 3 "\n\n(fn N)"] :complete 26 0 throw 27] 11 (#$ . 7411)])
#@563 Return year associated to ENTRY-OR-KEY.

ENTRY-OR-KEY is either an association list, as returned by
`org-cite-basic--get-entry', or a string representing a citation
key.  INFO is the export state, as a property list.

Year is obtained from the "year" field, if available, or from
the "date" field if it starts with a year pattern.

Unlike `org-cite-basic--get-field', this function disambiguates
author-year patterns by adding a letter suffix to the year when
necessary, unless optional argument NO-SUFFIX is non-nil.

(fn ENTRY-OR-KEY INFO &optional NO-SUFFIX)
(defalias 'org-cite-basic--get-year #[770 "\300\301\302$\300\303\302$\206' \300\304\305$\211;\205% \306\307\"\205% \310\311\"\262B;\2033 \202E :\203@ \312\236A\202E \313\314\"\315\316\"\317\"\211\204d \320BCB\321	\316B#\210\207\211:\205\227 \211\243\211\317\"A\206\203 \322GS!BB\262\211\262	\203\215 \202\221 P\262\262\262\207" [org-cite-basic--get-field author raw year date t string-match "\\`\\([[:digit:]]\\{4\\}\\)\\(?:\\'\\|[^[:digit:]]\\)" match-string 1 id error "Wrong value for ENTRY-OR-KEY: %S" plist-get :cite-basic/author-date-cache assoc "" plist-put org-cite-basic--number-to-suffix] 15 (#$ . 7840)])
#@201 Format ENTRY according to STYLE string.
ENTRY is an alist, as returned by `org-cite-basic--get-entry'.
Optional argument INFO is the export state, as a property list.

(fn ENTRY STYLE &optional INFO)
(defalias 'org-cite-basic--print-entry #[770 "\300\301#\300\302#\300\303#\206+ \300\304#\206+ \300\305#\206+ \300\306#\307\267\202v \310\311#\312\313\205C \314D\314\315&\207\316\317\236A\"\310\311#\312\320\321\"\314\322\323	\"\205o \314D\314\315&\207\310\"\312\324\325\322\323	\"\205\216 \314D\315&\207" [org-cite-basic--get-field author title publisher journal institution school #s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("plain" 49 "numeric" 74)) org-cite-basic--get-year no-suffix org-cite-concat ". " ", " "." org-cite-basic--key-number id format "[%d] " org-cite-emphasize italic " (" "). "] 17 (#$ . 9071)])
#@73 List cite keys close to KEY in terms of string distance.

(fn KEY KEYS)
(defalias 'org-cite-basic--close-keys #[514 "\300\301\302\"\"\207" [seq-filter make-closure #[257 "	\302\300\"Y\207" [V0 org-cite-basic-max-key-distance org-string-distance] 5 "\n\n(fn K)"]] 6 (#$ . 9995)])
#@286 Set keymap on citation key between BEG and END positions.

When the key is know, SUGGESTIONS is nil.  Otherwise, it may be
a list of replacement keys, as strings, which will be offered as
substitutes for the unknown key.  Finally, it may be the symbol
`all'.

(fn BEG END SUGGESTIONS)
(defalias 'org-cite-basic--set-keymap #[771 "\300 \301\302\303\267\202 \304\202 \305\202 \306\307$#\210\310\311$\207" [make-sparse-keymap define-key [mouse-1] #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (nil 11 all 15)) org-open-at-point org-cite-insert make-closure #[0 "\300\301\303\304\302G\305U\203 \302@\202 \306\307\302\310\311$P#\207" [V0 V1 V2 cl--set-buffer-substring "@" 1 completing-read "Did you mean: " nil t] 11 nil nil] put-text-property keymap] 12 (#$ . 10284)])
#@403 Set various text properties on CITATION object.

Fontify whole citation with `org-cite' face.  Fontify key with `error' face
when it does not belong to known keys.  Otherwise, use `org-cite-key' face.

Moreover, when mouse is on a known key, display the corresponding bibliography.
On a wrong key, suggest a list of possible keys, and offer to substitute one of
them with a mouse click.

(fn CITATION)
(defalias 'org-cite-basic-activate #[257 "\301!\302 \242\243\303\304\305$\210\306\307#\210\310!\211\205\207 \211@\311!\211\242\243\312\313\"\303\314$\210\211	\235\203X \315!\316\317\320\"!\306\321#\210\303\322$\210\323\324#\266\202\200 \306\325#\210\326\n\"\211\203u \303\322\327\330\331\332#P$\210\323\206} \333#\266A\266\202\202 \207" [org-cite-basic-mouse-over-key-face org-cite-boundaries org-cite-basic--all-keys put-text-property font-lock-multiline t add-face-text-property org-cite org-cite-get-references org-cite-key-boundaries org-element-property :key mouse-face org-cite-basic--get-entry org-element-interpret-data org-cite-basic--print-entry "plain" org-cite-key help-echo org-cite-basic--set-keymap nil error org-cite-basic--close-keys "Suggestions (mouse-1 to substitute): " mapconcat identity " " all] 21 (#$ . 11114)])
#@483 Format CITATION object according to author-year format.

FORMAT-CITE is a function of three arguments: the global prefix, the contents,
and the global suffix.  All arguments can be strings or secondary strings.

FORMAT-REF is a function of four arguments: the reference prefix, as a string or
secondary string, the author, the year, and the reference suffix, as a string or
secondary string.

INFO is the export state, as a property list.

(fn CITATION FORMAT-CITE FORMAT-REF INFO)
(defalias 'org-cite-basic--format-author-year #[1028 "\301\302\303\"\304\305\306#\307	!#\302\310	\"#\"\207" [org-cite-basic-author-year-separator org-export-data org-element-property :prefix org-cite-mapconcat make-closure #[257 "\302\303\"\302\304\"\302\305\"\300\306\307\301#\310\301\"$\207" [V0 V1 org-element-property :key :prefix :suffix org-cite-basic--get-field author org-cite-basic--get-year] 10 "\n\n(fn REF)"] org-cite-get-references :suffix] 12 (#$ . 12399)])
#@126 Return numbers associated to references in CITATION object.
INFO is the export state as a property list.

(fn CITATION INFO)
(defalias 'org-cite-basic--citation-numbers #[514 "\300\301\302\303\"\304\305\"\"\306\"\211@\307\211A\262\242!C\203f \211A\262\242@\211\203E TU\203E SU\203E @\310\232\204^ \310B\262\202^ @\310\232\203V \307!B\262\202^ \311\312\"B\262\262\266\202 \313\314\237\"\207" [sort mapcar make-closure #[257 "\301\300\"\207" [V0 org-cite-basic--key-number] 4 "\n\n(fn K)"] org-cite-get-references t < number-to-string "-" format ", %d" apply concat] 10 (#$ . 13380)])
#@134 Return a sort predicate comparing FIELD values for two citation keys.
INFO is the export state, as a property list.

(fn FIELD INFO)
(defalias 'org-cite-basic--field-less-p #[514 "\205	 \300\301#\207" [make-closure #[514 "\302\303\300\301\304$\303\300\301\304$\305\306$\207" [V0 V1 org-string-collate-lessp org-cite-basic--get-field raw nil t] 9 "\n\n(fn A B)"]] 6 (#$ . 13998)])
#@105 Sort KEYS by author name.
INFO is the export communication channel, as a property list.

(fn KEYS INFO)
(defalias 'org-cite-basic--sort-keys #[514 "\301\"\211\203 \302\"\207\207" [org-cite-basic-sorting-field org-cite-basic--field-less-p sort] 6 (#$ . 14390)])
#@183 Export CITATION object.
STYLE is the expected citation style, as a pair of strings or nil.  INFO is the
export communication channel, as a property list.

(fn CITATION STYLE _ INFO)
(defalias 'org-cite-basic-export-citation #[1028 "\301:\203\252 \242\211\302\267\202\221 \243\211\303\235\304\305\306\307#\310\311\"#\"\207\243\312\313\"\2034 \314\2025 \315\305\306\316\"\310\311\"#\"\207\317\207\243\320\235\203a \321!\204a \322\"\210\323\"\210\313\"\324\"\325	\326\306\327#	$\207\330!\211\242\243\304\331\332\333\"\334%\"\207\243\313\"\324\"\325	\306\335\"\306\336\"	$\207\337\340\"\207" [org-cite-basic-author-year-separator #[514 "\300\267\202 \301\202 \302\202 \303\304\"\235\207" [#s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (bare 7 caps 11)) ("bare" "bare-caps" "b" "bc") ("caps" "bare-caps" "c" "bc") error "Invalid variant type: %S"] 6 "\n\n(fn VARIANT TYPE)"] #s(hash-table size 12 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("a" 14 "author" 14 "na" 38 "noauthor" 38 "n" 68 "nocite" 68 "ft" 70 "t" 70 "note" 70 "text" 70 "nb" 120 "numeric" 120)) ("caps" "c") org-export-data mapconcat make-closure #[257 "\302\303\300#\301\203 \304!\207\207" [V0 V1 org-cite-basic--get-field author capitalize] 5 "\n\n(fn KEY)"] org-cite-get-references t format bare "%s" "(%s)" #[257 "\301\300\"\207" [V0 org-cite-basic--get-year] 4 "\n\n(fn KEY)"] nil ("note" "ft") org-cite-inside-footnote-p org-cite-adjust-note org-cite-wrap-citation caps org-cite-basic--format-author-year #[771 "\300#\207" [org-cite-concat] 7 "\n\n(fn P C S)"] #[1028 "\302\301\203\f \303!\202 \300\203 \304\202 \305\300?\205 \306&\207" [V0 V1 org-cite-concat capitalize " " " (" ")"] 11 "\n\n(fn P A Y S)"] org-cite-main-affixes org-cite-concat "(" org-cite-basic--citation-numbers ")" #[771 "\301\300?\205 \302\300?\205 \303%\207" [V0 org-cite-concat "(" ")"] 9 "\n\n(fn P C S)"] #[1028 "\301\300\203\f \302!\202 \303%\207" [V0 org-cite-concat capitalize ", "] 10 "\n\n(fn P A Y S)"] error "Invalid style: %S"] 16 (#$ . 14664)])
#@259 Generate bibliography.
KEYS is the list of cited keys, as strings.  STYLE is the expected bibliography
style, as a string.  BACKEND is the export back-end, as a symbol.  INFO is the
export state, as a property list.

(fn KEYS FILES STYLE PROPS BACKEND INFO)
(defalias 'org-cite-basic-export-bibliography #[1542 "\300\301\302$\303\"\304#\207" [mapconcat make-closure #[257 "\303\302\"\304\305\306\301\307\"\205 \310\311!\312\300\302#\"\302\"\207" [V0 V1 V2 org-cite-basic--get-entry org-export-data org-cite-make-paragraph org-export-derived-backend-p latex org-export-raw-string "\\noindent\n" org-cite-basic--print-entry] 9 "\n\n(fn K)"] org-cite-basic--sort-keys "\n"] 12 (#$ . 16826)])
#@229 Follow citation or citation reference DATUM.
When DATUM is a citation reference, open bibliography entry referencing
the citation key.  Otherwise, select which key to follow among all keys
present in the citation.

(fn DATUM _)
(defalias 'org-cite-basic-goto #[514 "\300!\301=\203 \302\303\"\2024 \304\305\306\"\211:\203/ \211\242\243\211\204' \266\204\2024 !\266\204\2024 !\266\202\307\310\311\"\312 \"\211:\203F \211\242\202J \313\314\"\262\315\316\"\210\317!\211\320\232\203t \321\322\323\324\325\326BBBBB\306\"eb\210\327!\210\330\331!\207\332 \210\333!\207" [org-element-type citation-reference org-element-property :key #[257 "\300\301\302\303$\206\f \304\305!\207" [completing-read "Select citation key: " nil t user-error "Aborted"] 6 "\n\n(fn KEYS)"] org-cite-get-references t seq-find make-closure #[257 "\211\243\301\300\"\207" [V0 gethash] 5 "\n\n(fn ARG0)"] org-cite-basic--parse-bibliography user-error "Cannot find citation key: %S" org-open-file (4) file-name-extension "json" rx-to-string seq "\"id\":" (0+ (any "[ 	]")) "\"" ("\"") re-search-forward search-backward "{" bibtex-set-dialect bibtex-search-entry] 12 (#$ . 17532)])
#@70 Offer completion for style.
Return chosen style as a string.

(fn _)
(defalias 'org-cite-basic--complete-style #[257 "\300\301\302 \"\211:\203 \211\242\243\211\204 \207\303\304\305\306$\207\303\304\305\306$\207" [mapcar #[257 "\211\242\211\242\207" [] 3 "\n\n(fn ARG0)"] org-cite-supported-styles completing-read "Style (\"\" for default): " nil t] 9 (#$ . 18704)])
#@233 Return completion table for cite keys, as a hash table.

In this hash table, keys are a strings with author, date, and
title of the reference.  Values are the cite keys.

Return nil if there are no bibliography files or no entries.
(defalias 'org-cite-basic--key-completion-table #[0 "\303 \211\204 \304\207\305\"\203 \207\306!\210\307 \211\203h \211@\310\311D\"\312\313\304\314$\211\203: \315\316\317\320#	\304\321$\202> \322	\321\"\262\n\323\304\324#\325\326\206M \327\"\262\n\312\330\304\331$\260\332#\266A\266\202\202 \210\333!?\205w \332\331#\210\207" [org-cite-basic--completion-cache org-cite-basic-author-column-end org-cite-basic-column-separator org-cite-basic--parse-bibliography nil gethash clrhash org-cite-basic--all-keys org-cite-basic--get-entry :cite-basic/bibliography org-cite-basic--get-field author raw truncate-string-to-width replace-regexp-in-string " and " "; " 32 make-string org-cite-basic--get-year no-suffix format "%4s" "" title t puthash map-empty-p] 13 (#$ . 19083)])
#@302 Prompt for a reference key and return a citation reference string.

When optional argument MULTIPLE is non-nil, prompt for multiple
keys, until one of them is nil.  Then return the list of
reference strings selected.

Raise an error when no bibliography is set in the buffer.

(fn &optional MULTIPLE)
(defalias 'org-cite-basic--complete-key #[256 "\300 \206 \301\302!\303\204 \304\305\"\"\306!\207\307C\310!\"\306!\203= \304\"\242B\240\210!\"\262\202! \210\242\207" [org-cite-basic--key-completion-table user-error "No bibliography set" #[514 "\300\301\302$\207" [completing-read nil t] 7 "\n\n(fn TABLE TEXT)"] gethash "Key: " org-string-nw-p nil #[257 "\211\242\203 \300\301\302\303\304\242!\305#\"\207\306\207" [format "Key (empty input exits) %s: " mapconcat identity reverse ";" "Key (empty input exits): "] 7 "\n\n(fn KEYS)"]] 10 (#$ . 20117)])
(byte-code "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\"\316\317&\210\320\321!\207" [org-cite-register-processor basic :activate org-cite-basic-activate :export-citation org-cite-basic-export-citation :export-bibliography org-cite-basic-export-bibliography :follow org-cite-basic-goto :insert org-cite-make-insert-processor org-cite-basic--complete-key org-cite-basic--complete-style :cite-styles ((("author" "a") ("caps" "c")) (("noauthor" "na") ("bare" "b")) (("nocite" "n")) (("note" "ft") ("bare-caps" "bc") ("caps" "c")) (("numeric" "nb")) (("text" "t") ("bare-caps" "bc") ("caps" "c")) (("nil") ("bare" "b") ("bare-caps" "bc") ("caps" "c"))) provide oc-basic] 14)
