;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\207" [require comint dash lsp-mode lsp-dart-protocol lsp-dart-utils] 2) (defconst lsp-dart-flutter-daemon-buffer-name "*LSP Dart - Flutter daemon*") (defconst lsp-dart-flutter-daemon-name "LSP Dart - Flutter daemon") (defvar lsp-dart-flutter-daemon-devices nil) (defvar lsp-dart-flutter-daemon-commands nil) (defvar lsp-dart-flutter-daemon-device-added-listeners nil) #@96 Log for LEVEL, MSG with ARGS adding lsp-dart-flutter-daemon prefix. (fn LEVEL MSG &rest ARGS) (defalias 'lsp-dart-flutter-daemon--log #[642 "\226\300\230?\205\301\302\303\226\304Q$\207" ["STATUS" apply lsp-dart-custom-log "[FLUTTER " "] "] 8 (#$ . 529)]) #@31 Generate a random command id. (defalias 'lsp-dart-flutter-daemon--generate-command-id #[0 "\300\301!\207" [random 100000] 2 (#$ . 797)]) #@58 Return non-nil if the Flutter daemon is already running. (defalias 'lsp-dart-flutter-daemon--running-p #[0 "\301!\207" [lsp-dart-flutter-daemon-buffer-name comint-check-proc] 2 (#$ . 940)]) #@27 Start the Flutter daemon. (defalias 'lsp-dart-flutter-daemon-start #[0 "\303 ?\205+\304!\305 \306 \307\310%\210r\211q\210\311\312!\204\312 \210\313\302!\210\314)\315\316!\262\207" [lsp-dart-flutter-daemon-buffer-name lsp-dart-flutter-daemon-name comint-output-filter-functions lsp-dart-flutter-daemon--running-p get-buffer-create make-comint-in-buffer lsp-dart-flutter-command nil "daemon" derived-mode-p lsp-dart-flutter-daemon-mode make-local-variable lsp-dart-flutter-daemon--handle-responses lsp-dart-flutter-daemon--send "device.enable"] 7 (#$ . 1137)]) #@111 Build a command from an ID and METHOD. PARAMS is the optional method params. (fn ID METHOD &optional PARAMS) (defalias 'lsp-dart-flutter-daemon--build-command #[770 "\300\301\302$\203\303\"\210\304\305\306\307\310\311%\312Q\207" [lsp-make-flutter-daemon-command :id :method lsp:set-flutter-daemon-command-params\? "[" json-serialize :null-object nil :false-object :json-false "]\n"] 11 (#$ . 1710)]) #@61 Parse raw RESPONSE into a list of responses. (fn RESPONSE) (defalias 'lsp-dart-flutter-daemon--raw->response #[257 "\300\301\302!\"\205-\211\302!\303\304\305\306\307%\303\310\311\306\307%\312\304\"\313\314\"\262\262\262\262\262\207" [string-prefix-p "[" string-trim replace-regexp-in-string "\n" "" nil literal "]\\[" "]\n[" split-string -map #[257 "\301\302\303\203\f\304\202 \305\306\307\310\307&!\207" [lsp-use-plists lsp-seq-first json-parse-string :object-type plist hash-table :null-object nil :false-object] 10 "\n\n(fn EL)"]] 10 (#$ . 2125)]) #@70 Handle Flutter daemon response from RAW-RESPONSE. (fn RAW-RESPONSE) (defalias 'lsp-dart-flutter-daemon--handle-responses #[257 "\300\301\302!\"\207" [-map #[257 "\301\302\"\301\303\"\301\304\"\301\305\"\306!\205\301\307\"\306!\205$\301\310\"\203=\311\267\202;\312!\207\313!\207\314\"\207\315\207\316\"\317\320\"\203P\321\"\211\205\\\205\\\211!\207" [lsp-dart-flutter-daemon-commands gethash "id" "event" "result" "params" ht\? "level" "message" #s(hash-table size 3 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("device.removed" 46 "device.added" 50 "daemon.logMessage" 54)) lsp-dart-flutter-daemon--device-removed lsp-dart-flutter-daemon--device-added lsp-dart-flutter-daemon--log nil alist-get plist-get :callback lsp-dart-remove-from-alist] 12 "\n\n(fn INPUT0)"] lsp-dart-flutter-daemon--raw->response] 5 (#$ . 2700)]) #@186 Build and send command with METHOD with optional PARAMS. Call CALLBACK if provided when the receive a response with the built id of this command. (fn METHOD &optional PARAMS CALLBACK) (defalias 'lsp-dart-flutter-daemon--send #[769 "\301 \204\302 \210\303 \304#\305\306\307DB\"\210\310\311!\"\207" [lsp-dart-flutter-daemon-buffer-name lsp-dart-flutter-daemon--running-p lsp-dart-flutter-daemon-start lsp-dart-flutter-daemon--generate-command-id lsp-dart-flutter-daemon--build-command add-to-list lsp-dart-flutter-daemon-commands :callback comint-send-string get-buffer-process] 10 (#$ . 3587)]) #@51 Remove DEVICE from the devices list. (fn DEVICE) (defalias 'lsp-dart-flutter-daemon--device-removed #[257 "\301\302\"\303\"\211\211\207" [lsp-dart-flutter-daemon-devices gethash "id" lsp-dart-remove-from-alist] 5 (#$ . 4198)]) #@46 Add DEVICE to the devices list. (fn INPUT0) (defalias 'lsp-dart-flutter-daemon--device-added #[257 "\211\302\303\"\211B\211\304\305\"\210\306\"\307\300\"\210\310 \"\211\205+\306 \"\311\312\"!\207" [lsp-dart-flutter-daemon-devices lsp-dart-flutter-daemon-device-added-listeners gethash "id" lsp:set-flutter-daemon-device-is-device\? t lsp-dart-remove-from-alist add-to-list alist-get plist-get :callback] 9 (#$ . 4436)]) #@92 Call CALLBACK with the available emulators and devices from Flutter daemon. (fn CALLBACK) (defalias 'lsp-dart-flutter-daemon-get-devices #[257 "\300\301\302\303\304\"#\207" [lsp-dart-flutter-daemon--send "emulator.getEmulators" nil make-closure #[257 "\300\302\303\304 \"\"!\207" [V0 lsp-dart-flutter-daemon-devices append -map cdr] 7 "\n\n(fn EMULATORS)"]] 7 (#$ . 4876)]) #@83 Launch DEVICE and wait for connected state and call CALLBACK. (fn INPUT0 INPUT1) (defalias 'lsp-dart-flutter-daemon-launch #[514 "\300\301\"\300\302\"\203\211!\207\303\304\"\305\306\307DB\"\210\310\311#\207" [gethash "id" "isDevice" lsp-make-flutter-daemon-emulator-launch :emulator-id add-to-list lsp-dart-flutter-daemon-device-added-listeners :callback lsp-dart-flutter-daemon--send "emulator.launch"] 12 (#$ . 5259)]) (defvar lsp-dart-flutter-daemon-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [lsp-dart-flutter-daemon-mode-hook variable-documentation put "Hook run after entering lsp-dart-flutter-daemon-name mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp lsp-dart-flutter-daemon-mode-map definition-name lsp-dart-flutter-daemon-mode] 4) (defvar lsp-dart-flutter-daemon-mode-map (make-sparse-keymap)) (byte-code "\301\302N\204\303\301\302\304\305!#\210\306\307!\204\303\307\310\311#\210\312\313 !\210\307\302N\204-\303\307\302\304\314!#\210\306\300!\204B\303\300\310\311#\210\315\316\300\317\"\210!\210\300\302N\204P\303\300\302\304\320!#\210\303\311\321\322#\207" [lsp-dart-flutter-daemon-mode-abbrev-table lsp-dart-flutter-daemon-mode-map variable-documentation put purecopy "Keymap for `lsp-dart-flutter-daemon-mode'." boundp lsp-dart-flutter-daemon-mode-syntax-table definition-name lsp-dart-flutter-daemon-mode (lambda (#1=#:def-tmp-var) (defvar lsp-dart-flutter-daemon-mode-syntax-table #1#)) make-syntax-table "Syntax table for `lsp-dart-flutter-daemon-mode'." (lambda (#1#) (defvar lsp-dart-flutter-daemon-mode-abbrev-table #1#)) define-abbrev-table nil "Abbrev table for `lsp-dart-flutter-daemon-mode'." derived-mode-parent comint-mode] 5) #@275 Major mode for `lsp-dart-flutter-daemon-start`. In addition to any hooks its parent mode `comint-mode' might have run, this mode runs the hook `lsp-dart-flutter-daemon-mode-hook', as the final or penultimate step during initialization. \{lsp-dart-flutter-daemon-mode-map} (defalias 'lsp-dart-flutter-daemon-mode #[0 "\306\300!\210\307\310 \210\311\n\310\312N\203\313\311\312\310\312N#\210\314\f!\204'\315\f\316 \"\210\317 !\211\2035\211\320 =\203;\321 \322 \"\210\210\323 \324\"\204U !=\204U\325 \324!C#\210\326\f!\210\327 !\210 !\330\211\"#\331\332\333 \334\335\332!Q\"\210)\336\337!\207" [delay-mode-hooks major-mode lsp-dart-flutter-daemon-name mode-name lsp-dart-flutter-daemon-mode-map lsp-dart-flutter-daemon-mode-syntax-table make-local-variable t comint-mode lsp-dart-flutter-daemon-mode mode-class put keymap-parent set-keymap-parent current-local-map char-table-parent standard-syntax-table set-char-table-parent syntax-table abbrev-table-get :parents abbrev-table-put use-local-map set-syntax-table nil setenv "PATH" lsp-dart-flutter-command ":" getenv run-mode-hooks lsp-dart-flutter-daemon-mode-hook lsp-dart-flutter-daemon-mode-abbrev-table local-abbrev-table comint-prompt-read-only comint-process-echoes] 7 (#$ . 7101) nil]) (provide 'lsp-dart-flutter-daemon)