;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\302\303\304\305\306DD\307\310\311\312\313&\207" [require cl-lib custom-declare-variable sx-encoding-html-entities-plist funcall function #[0 "\300\207" [(Aacute "Á" aacute "á" Acirc "Â" acirc "â" acute "´" AElig "Æ" aelig "æ" Agrave "À" agrave "à" alefsym "ℵ" Alpha "Α" alpha "α" amp "&" and "∧" ang "∠" apos "'" aring "å" Aring "Å" asymp "≈" atilde "ã" Atilde "Ã" auml "ä" Auml "Ä" bdquo "„" Beta "Β" beta "β" brvbar "¦" bull "•" cap "∩" ccedil "ç" Ccedil "Ç" cedil "¸" cent "¢" Chi "Χ" chi "χ" circ "ˆ" clubs "♣" cong "≅" copy "©" crarr "↵" cup "∪" curren "¤" Dagger "‡" dagger "†" darr "↓" dArr "⇓" deg "°" Delta "Δ" delta "δ" diams "♦" divide "÷" eacute "é" Eacute "É" ecirc "ê" Ecirc "Ê" egrave "è" Egrave "È" empty "∅" emsp " " ensp " " Epsilon "Ε" epsilon "ε" equiv "≡" Eta "Η" eta "η" eth "ð" ETH "Ð" euml "ë" Euml "Ë" euro "€" exist "∃" fnof "ƒ" forall "∀" frac12 "½" frac14 "¼" frac34 "¾" frasl "⁄" Gamma "Γ" gamma "γ" ge "≥" gt ">" harr "↔" hArr "⇔" hearts "♥" hellip "…" iacute "í" Iacute "Í" icirc "î" Icirc "Î" iexcl "¡" igrave "ì" Igrave "Ì" image "ℑ" infin "∞" int "∫" Iota "Ι" iota "ι" iquest "¿" isin "∈" iuml "ï" Iuml "Ï" Kappa "Κ" kappa "κ" Lambda "Λ" lambda "λ" lang "〈" laquo "«" larr "←" lArr "⇐" lceil "⌈" ldquo "“" le "≤" lfloor "⌊" lowast "∗" loz "◊" lrm #1="" lsaquo "‹" lsquo "‘" lt "<" macr "¯" mdash "—" micro "µ" middot "·" minus "−" Mu "Μ" mu "μ" nabla "∇" nbsp " " ndash "–" ne "≠" ni "∋" not "¬" notin "∉" nsub "⊄" ntilde "ñ" Ntilde "Ñ" Nu "Ν" nu "ν" oacute "ó" Oacute "Ó" ocirc "ô" Ocirc "Ô" OElig "Œ" oelig "œ" ograve "ò" Ograve "Ò" oline "‾" omega "ω" Omega "Ω" Omicron "Ο" omicron "ο" oplus "⊕" or "∨" ordf "ª" ordm "º" oslash "ø" Oslash "Ø" otilde "õ" Otilde "Õ" otimes "⊗" ouml "ö" Ouml "Ö" para "¶" part "∂" permil "‰" perp "⊥" Phi "Φ" phi "φ" Pi "Π" pi "π" piv "ϖ" plusmn "±" pound "£" Prime "″" prime "′" prod "∏" prop "∝" Psi "Ψ" psi "ψ" quot "\"" radic "√" rang "〉" raquo "»" rarr "→" rArr "⇒" rceil "⌉" rdquo "”" real "ℜ" reg "®" rfloor "⌋" Rho "Ρ" rho "ρ" rlm #1# rsaquo "›" rsquo "’" sbquo "‚" scaron "š" Scaron "Š" sdot "⋅" sect "§" shy #1# Sigma "Σ" sigma "σ" sigmaf "ς" sim "∼" spades "♠" sub "⊂" sube "⊆" sum "∑" sup "⊃" sup1 "¹" sup2 "²" sup3 "³" supe "⊇" szlig "ß" Tau "Τ" tau "τ" there4 "∴" Theta "Θ" theta "θ" thetasym "ϑ" thinsp " " thorn "þ" THORN "Þ" tilde "˜" times "×" trade "™" uacute "ú" Uacute "Ú" uarr "↑" uArr "⇑" ucirc "û" Ucirc "Û" ugrave "ù" Ugrave "Ù" uml "¨" upsih "ϒ" Upsilon "Υ" upsilon "υ" uuml "ü" Uuml "Ü" weierp "℘" Xi "Ξ" xi "ξ" yacute "ý" Yacute "Ý" yen "¥" yuml "ÿ" Yuml "Ÿ" Zeta "Ζ" zeta "ζ" zwj #1# zwnj #1#)] 1] "Plist of HTML entities and their respective glyphs.\nSee `sx-encoding-decode-entities'." :type (repeat (choice symbol string)) :group sx] 8) #@267 Decode HTML entities (e.g. """) in STRING. Done according to `sx-encoding-html-entities-plist'. If this list does not contain the entity, it is assumed to be a number and converted to a string (with `char-to-string'). Return the decoded string. (fn STRING) (defalias 'sx-encoding-decode-entities #[257 "\301\302\"\303\304#\207" [sx-encoding-html-entities-plist make-closure #[257 "\211\301\302O\303\300\304!\"\206\305\306\301\307O!!\207" [V0 1 -1 plist-get intern char-to-string string-to-number nil] 7 "\n\n(fn S)"] replace-regexp-in-string "&[^; ]*;"] 7 (#$ . 3183)]) #@253 Normalize the line endings for STRING. The API returns strings that use Windows-style line endings. These are largely useless in an Emacs environment. Windows uses "\r\n", Unix uses just "\n". Deleting "\r" is sufficient for conversion. (fn STRING) (defalias 'sx-encoding-normalize-line-endings #[257 "\300\301\"\207" [delete 13] 4 (#$ . 3777)]) #@171 Clean STRING for display. Applies `sx-encoding-normalize-line-endings' and `sx-encoding-decode-entities' (in that order) to prepare STRING for sane display. (fn STRING) (defalias 'sx-encoding-clean-content #[257 "\300\301!!\207" [sx-encoding-decode-entities sx-encoding-normalize-line-endings] 4 (#$ . 4134)]) #@498 Clean DATA recursively where necessary. If DATA is a list or a vector, map this function over DATA and return as the the same type of structure. If DATA is a cons cell (but not a list), use `sx-encoding-clean-content-deep' on the `cdr' of DATA. If DATA is a string, return DATA after applying `sx-encoding-clean-content'. Otherwise, return DATA. This function is highly specialized for the data structures returned by `json-read' via `sx-request-make'. It may fail in some cases. (fn DATA) (defalias 'sx-encoding-clean-content-deep #[257 "\211:\203'\211A<\203\300\301\302\303\304$\205\305\"\207\211@\301A!B\207\211;\2030\306!\207\307!\203J\310\301\302\303\304$\205I\305\"\207\207" [list sx-encoding-clean-content-deep nil apply cl-mapcar cl-coerce sx-encoding-clean-content vectorp vector] 10 (#$ . 4453)]) #@201 Check for magic bytes in DATA. Check if the first two bytes of a string in DATA match the magic numbers identifying the gzip file format. See URL `http://www.gzip.org/zlib/rfc-gzip.html'. (fn DATA) (defalias 'sx-encoding-gzipped-p #[257 "\300!\301\302O\303\304\305\"\232\207" [string-as-unibyte 0 2 unibyte-string 31 139] 5 (#$ . 5301)]) #@79 Check if BUFFER is gzip-compressed. See `sx-encoding-gzipped-p'. (fn BUFFER) (defalias 'sx-encoding-gzipped-buffer-p #[257 "r\211q\210\300\301 !)\207" [sx-encoding-gzipped-p buffer-string] 3 (#$ . 5648)]) #@79 Check if the FILE is gzip-compressed. See `sx-encoding-gzipped-p'. (fn FILE) (defalias 'sx-encoding-gzipped-file-p #[257 "\300\301\302\"r\211q\210\303\304\"\216\305\306!\210\307\306\310\311$\210\312 *\262\313!\207" [generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] set-buffer-multibyte nil insert-file-contents-literally 0 2 buffer-string sx-encoding-gzipped-p] 7 (#$ . 5860)]) (provide 'sx-encoding)