<commit_before>var ws = {
    stream: [],
    startup: 'local',
    monitor: {
        home: false,
        local: false,
        public: false,
        tag: false,
        notification: false
    },
};
let InstanceModeElement = (function () {
    function InstanceModeElement() {
        this._cmd_mode = "global";
        this._user_max = 9999999;
        this._sh_stats_opt = [
            {
                "type": "command",
                "name": "limit",
                "optional": "limit",
                "description": '取得トゥート数',
                "children": [
                    {
                        "type": "number",
                        "name": "post_limits",
                        "min": 1,
                        "max": 40,
                        "description": 'トゥート数(初期値20)',
                        "execute": this.show_statuses,
                        "children": [
                            {
                                "type": "command",
                                "name": "max_id",
                                "optional": "max_id",
                                "description": '指定ID以前のトゥートを表示',
                                "children": [
                                    {
                                        "type": "paramater",
                                        "name": "status_id",
                                        "description": 'トゥートID',
                                        "execute": this.show_statuses
                                    }
                                ]
                            }
                        ]
                    }
                ]
            }, {
                "type": "command",
                "name": "max_id",
                "optional": "max_id",
                "description": '指定ID以前のトゥートを表示',
                "children": [
                    {
                        "type": "paramater",
                        "name": "status_id",
                        "description": 'トゥートID',
                        "execute": this.show_statuses,
                        "children": [
                            {
                                "type": "command",
                                "name": "limit",
                                "optional": "limit",
                                "description": '取得トゥート数',
                                "children": [
                                    {
                                        "type": "number",
                                        "name": "post_limits",
                                        "min": 1,
                                        "max": 40,
                                        "description": 'トゥート数(初期値20)',
                                        "execute": this.show_statuses
                                    }
                                ]
                            }
                        ]
                    }
                ]
            }
        ];
        this._acl_opts = [
            {
                "type": "command",
                "name": "color",
                "optional": "is_color",
                "description": "背景色を設定します",
                "children": [
                    {
                        "type": "command",
                        "name": "red",
                        "description": "赤色",
                        "execute": this.set_acl
                    }, {
                        "type": "command",
                        "name": "green",
                        "description": "緑色",
                        "execute": this.set_acl
                    }, {
                        "type": "command",
                        "name": "blue",
                        "description": "青色",
                        "execute": this.set_acl
                    }, {
                        "type": "command",
                        "name": "yellow",
                        "description": "黄色",
                        "execute": this.set_acl
                    }, {
                        "type": "command",
                        "name": "purple",
                        "description": "紫色",
                        "execute": this.set_acl
                    }, {
                        "type": "command",
                        "name": "cyan",
                        "description": "水色",
                        "execute": this.set_acl
                    }, {
                        "type": "command",
                        "name": "dark-red",
                        "description": "濃赤色",
                        "execute": this.set_acl
                    }, {
                        "type": "command",
                        "name": "dark-blue",
                        "description": "紺色",
                        "execute": this.set_acl
                    }, {
                        "type": "command",
                        "name": "dark-green",
                        "description": "深緑色",
                        "execute": this.set_acl
                    }, {
                        "type": "command",
                        "name": "dark-yellow",
                        "description": "山吹色",
                        "execute": this.set_acl
                    }, {
                        "type": "command",
                        "name": "dark-purple",
                        "description": "紫紺色",
                        "execute": this.set_acl
                    }, {
                        "type": "command",
                        "name": "dark-cyan",
                        "description": "藍色",
                        "execute": this.set_acl
                    }
                ]
            }, {
                "type": "command",
                "name": "notification",
                "optional": "is_notify",
                "description": "デスクトップ通知を設定します。",
                "execute": this.set_acl
            }, {
                "type": "command",
                "name": "voice",
                "optional": "is_voice",
                "description": "合成音声を設定します。",
                "children": [
                    {
                        "type": "paramater",
                        "name": "voice_text",
                        "description": "文字",
                        "execute": this.set_acl
                    }
                ]
            }
        ];
        this._dataset = [
            {
                "type": "command",
                "name": "toot",
                "description": "書き込みを投稿します。",
                "execute": this.toot,
                "children": [
                    {
                        "type": "command",
                        "name": "public",
                        "description": '公開範囲を "公開" に設定します。',
                        "execute": this.toot,
                    }, {
                        "type": "command",
                        "name": "unlisted",
                        "description": '公開範囲を "未収載" に設定します。',
                        "execute": this.toot,
                    }, {
                        "type": "command",
                        "name": "private",
                        "description": '公開範囲を "非公開" に設定します。',
                        "execute": this.toot,
                    }
                ]
            }, {
                "type": "command",
                "name": "show",
                "description": "情報を表示します。",
                "children": [
                    {
                        "type": "command",
                        "name": "access-list",
                        "description": '正規表現フィルターを表示します。',
                        "execute": this.show_acl,
                    }, {
                        "type": "command",
                        "name": "terminal",
                        "description": '再生中のストリーミング情報を表示します。',
                        "execute": this.show_terminal,
                    }, {
                        "type": "command",
                        "name": "user",
                        "description": 'ユーザー情報を表示します。',
                        "execute": this.show_user,
                        "children": [
                            {
                                "type": "command",
                                "name": "id",
                                "description": 'ユーザーIDを指定',
                                "children": [
                                    {
                                        "type": "number",
                                        "name": "userid",
                                        "min": 1,
                                        "max": this._user_max,
                                        "description": 'ユーザID',
                                        "execute": this.show_user,
                                        "children": [
                                            {
                                                "type": "command",
                                                "name": "statuses",
                                                "description": 'ユーザの最新トゥートを表示',
                                                "execute": this.show_statuses,
                                                "children": this._sh_stats_opt.concat([
                                                    {
                                                        "type": "command",
                                                        "name": "pinned",
                                                        "optional": "pinned",
                                                        "description": '固定トゥートを表示します。',
                                                        "execute": this.show_statuses
                                                    }, {
                                                        "type": "command",
                                                        "name": "media",
                                                        "optional": "media",
                                                        "description": 'メディアトゥートを表示します。',
                                                        "execute": this.show_statuses
                                                    }
                                                ])
                                            }, {
                                                "type": "command",
                                                "name": "following",
                                                "description": 'フォローアカウントを表示します。',
                                                "execute": this.show_follows
                                            }, {
                                                "type": "command",
                                                "name": "followers",
                                                "description": 'フォロワーアカウントを表示します。',
                                                "execute": this.show_follows,
                                            }
                                        ]
                                    }
                                ]
                            }, {
                                "type": "command",
                                "name": "self",
                                "description": 'ログインユーザー',
                                "execute": this.show_user,
                                "children": [
                                    {
                                        "type": "command",
                                        "name": "statuses",
                                        "description": 'ユーザの最新トゥートを表示',
                                        "execute": this.show_statuses,
                                        "children": this._sh_stats_opt
                                        /*"children": [
                                            {
                                                "type": "command",
                                                "name": "limit",
                                                "description": 'トゥート表示件数を設定します。',
                                                "children": [
                                                    {
                                                        "type": "number",
                                                        "name": "post_limits",
                                                        "min": 1,
                                                        "max": 40,
                                                        "description": 'トゥート数(初期値20)',
                                                        "execute": this.show_statuses
                                                    }
                                                ]
                                            }, {
                                                "type": "command",
                                                "name": "pinned",
                                                "optional": "pinned",
                                                "description": '固定トゥートを表示します。',
                                                "execute": this.show_statuses
                                            }
                                        ]*/
                                    }, {
                                        "type": "command",
                                        "name": "following",
                                        "description": 'フォローアカウントを表示します。',
                                        "execute": this.show_follows
                                    }, {
                                        "type": "command",
                                        "name": "followers",
                                        "description": 'フォロワーアカウントを表示します。',
                                        "execute": this.show_follows,
                                    }
                                ]
                            }, {
                                "type": "command",
                                "name": "name",
                                "description": 'ユーザ名・アカウント名から検索表示',
                                "children": [
                                    {
                                        "type": "paramater",
                                        "name": "account",
                                        "description": 'ユーザ名・アカウント名',
                                        "execute": this.show_user,
                                    }
                                ]
                            }
                        ]
                    }, {
                        "type": "command",
                        "name": "instance",
                        "description": 'インスタンス情報を表示します。',
                        "execute": this.show_instance,
                    }, {
                        "type": "command",
                        "name": "application",
                        "description": 'クライアント情報を表示します。',
                        "execute": this.show_application,
                    }, {
                        "type": "command",
                        "name": "timeline",
                        "description": 'タイムラインの最新トゥートを表示します。',
                        "execute": this.show_statuses,
                        "children": [
                            {
                                "type": "command",
                                "name": "home",
                                "description": 'ホームタイムライン',
                                "execute": this.show_statuses,
                                "children": this._sh_stats_opt
                            }, {
                                "type": "command",
                                "name": "local",
                                "description": 'ローカルタイムライン',
                                "execute": this.show_statuses,
                                "children": this._sh_stats_opt
                            }, {
                                "type": "command",
                                "name": "public",
                                "description": '連合タイムライン',
                                "execute": this.show_statuses,
                                "children": this._sh_stats_opt
                            }, {
                                "type": "command",
                                "name": "tag",
                                "description": 'ハッシュタグ',
                                "children": [
                                    {
                                        "type": "paramater",
                                        "name": "tag_name",
                                        "description": 'タグ名',
                                        "execute": this.show_statuses,
                                        "children": this._sh_stats_opt
                                    }
                                ]
                            }, {
                                "type": "command",
                                "name": "notifications",
                                "description": '通知タイムライン',
                                "execute": this.show_notifications,
                                "children": this._sh_stats_opt
                            }
                        ]
                    }, {
                        "type": "command",
                        "name": "statuses",
                        "description": 'トゥートを表示します。',
                        "children": [
                            {
                                "type": "command",
                                "name": "id",
                                "description": 'トゥートIDを指定',
                                "children": [
                                    {
                                        "type": "paramater",
                                        "name": "status_id",
                                        "description": 'トゥートID',
                                        "execute": this.show_status_id,
                                        "children": [
                                            {
                                                "type": "command",
                                                "name": "favourited",
                                                "description": 'お気に入りユーザー一覧',
                                                "execute": this.show_follows
                                            }, {
                                                "type": "command",
                                                "name": "reblogged",
                                                "description": 'ブーストユーザー一覧',
                                                "execute": this.show_follows
                                            }
                                        ]
                                    }
                                ]
                            }
                        ]
                    }
                ]
            }, {
                "type": "command",
                "name": "search",
                "description": "検索を行います",
                "children": [
                    {
                        "type": "command",
                        "name": "local",
                        "description": 'インスタンス内から検索します。',
                        "children": [
                            {
                                "type": "paramater",
                                "name": "query",
                                "description": '検索キーワード',
                                "execute": this.search_query,
                            }
                        ]
                    },/* { 早く対応したいなー
                        "type": "command",
                        "name": "tootsearch",
                        "description": 'tootsearchエンジンを利用して検索します。',
                        "children": [
                            {
                                "type": "paramater",
                                "name": "query",
                                "description": '検索キーワード',
                                "execute": this.search_query,
                            }
                        ]
                    }*/
                ]
            }, {
                "type": "command",
                "name": "login",
                "description": 'インスタンスにログインをし、アクセストークンを更新します',
                "execute": this.login,
            }, {
                "type": "command",
                "name": "terminal",
                "description": 'ストリーミングの設定を行います。',
                "execute": this.terminal_monitor,
                "children": [
                    {
                        "type": "command",
                        "name": "monitor",
                        "optional": "on_monitor",
                        "description": 'ストリーミングを有効にします。',
                        "execute": this.terminal_monitor,
                        "children": [
                            {
                                "type": "command",
                                "name": "notification",<commit_msg>tootsearchだけ対応<commit_after>var ws = {
    stream: [],
    startup: 'local',
    monitor: {
        home: false,
        local: false,
        public: false,
        tag: false,
        notification: false
    },
};
let InstanceModeElement = (function () {
    function InstanceModeElement() {
        this._cmd_mode = "global";
        this._user_max = 9999999;
        this._sh_stats_opt = [
            {
                "type": "command",
                "name": "limit",
                "optional": "limit",
                "description": '取得トゥート数',
                "children": [
                    {
                        "type": "number",
                        "name": "post_limits",
                        "min": 1,
                        "max": 40,
                        "description": 'トゥート数(初期値20)',
                        "execute": this.show_statuses,
                        "children": [
                            {
                                "type": "command",
                                "name": "max_id",
                                "optional": "max_id",
                                "description": '指定ID以前のトゥートを表示',
                                "children": [
                                    {
                                        "type": "paramater",
                                        "name": "status_id",
                                        "description": 'トゥートID',
                                        "execute": this.show_statuses
                                    }
                                ]
                            }
                        ]
                    }
                ]
            }, {
                "type": "command",
                "name": "max_id",
                "optional": "max_id",
                "description": '指定ID以前のトゥートを表示',
                "children": [
                    {
                        "type": "paramater",
                        "name": "status_id",
                        "description": 'トゥートID',
                        "execute": this.show_statuses,
                        "children": [
                            {
                                "type": "command",
                                "name": "limit",
                                "optional": "limit",
                                "description": '取得トゥート数',
                                "children": [
                                    {
                                        "type": "number",
                                        "name": "post_limits",
                                        "min": 1,
                                        "max": 40,
                                        "description": 'トゥート数(初期値20)',
                                        "execute": this.show_statuses
                                    }
                                ]
                            }
                        ]
                    }
                ]
            }
        ];
        this._acl_opts = [
            {
                "type": "command",
                "name": "color",
                "optional": "is_color",
                "description": "背景色を設定します",
                "children": [
                    {
                        "type": "command",
                        "name": "red",
                        "description": "赤色",
                        "execute": this.set_acl
                    }, {
                        "type": "command",
                        "name": "green",
                        "description": "緑色",
                        "execute": this.set_acl
                    }, {
                        "type": "command",
                        "name": "blue",
                        "description": "青色",
                        "execute": this.set_acl
                    }, {
                        "type": "command",
                        "name": "yellow",
                        "description": "黄色",
                        "execute": this.set_acl
                    }, {
                        "type": "command",
                        "name": "purple",
                        "description": "紫色",
                        "execute": this.set_acl
                    }, {
                        "type": "command",
                        "name": "cyan",
                        "description": "水色",
                        "execute": this.set_acl
                    }, {
                        "type": "command",
                        "name": "dark-red",
                        "description": "濃赤色",
                        "execute": this.set_acl
                    }, {
                        "type": "command",
                        "name": "dark-blue",
                        "description": "紺色",
                        "execute": this.set_acl
                    }, {
                        "type": "command",
                        "name": "dark-green",
                        "description": "深緑色",
                        "execute": this.set_acl
                    }, {
                        "type": "command",
                        "name": "dark-yellow",
                        "description": "山吹色",
                        "execute": this.set_acl
                    }, {
                        "type": "command",
                        "name": "dark-purple",
                        "description": "紫紺色",
                        "execute": this.set_acl
                    }, {
                        "type": "command",
                        "name": "dark-cyan",
                        "description": "藍色",
                        "execute": this.set_acl
                    }
                ]
            }, {
                "type": "command",
                "name": "notification",
                "optional": "is_notify",
                "description": "デスクトップ通知を設定します。",
                "execute": this.set_acl
            }, {
                "type": "command",
                "name": "voice",
                "optional": "is_voice",
                "description": "合成音声を設定します。",
                "children": [
                    {
                        "type": "paramater",
                        "name": "voice_text",
                        "description": "文字",
                        "execute": this.set_acl
                    }
                ]
            }
        ];
        this._dataset = [
            {
                "type": "command",
                "name": "toot",
                "description": "書き込みを投稿します。",
                "execute": this.toot,
                "children": [
                    {
                        "type": "command",
                        "name": "public",
                        "description": '公開範囲を "公開" に設定します。',
                        "execute": this.toot,
                    }, {
                        "type": "command",
                        "name": "unlisted",
                        "description": '公開範囲を "未収載" に設定します。',
                        "execute": this.toot,
                    }, {
                        "type": "command",
                        "name": "private",
                        "description": '公開範囲を "非公開" に設定します。',
                        "execute": this.toot,
                    }
                ]
            }, {
                "type": "command",
                "name": "show",
                "description": "情報を表示します。",
                "children": [
                    {
                        "type": "command",
                        "name": "access-list",
                        "description": '正規表現フィルターを表示します。',
                        "execute": this.show_acl,
                    }, {
                        "type": "command",
                        "name": "terminal",
                        "description": '再生中のストリーミング情報を表示します。',
                        "execute": this.show_terminal,
                    }, {
                        "type": "command",
                        "name": "user",
                        "description": 'ユーザー情報を表示します。',
                        "execute": this.show_user,
                        "children": [
                            {
                                "type": "command",
                                "name": "id",
                                "description": 'ユーザーIDを指定',
                                "children": [
                                    {
                                        "type": "number",
                                        "name": "userid",
                                        "min": 1,
                                        "max": this._user_max,
                                        "description": 'ユーザID',
                                        "execute": this.show_user,
                                        "children": [
                                            {
                                                "type": "command",
                                                "name": "statuses",
                                                "description": 'ユーザの最新トゥートを表示',
                                                "execute": this.show_statuses,
                                                "children": this._sh_stats_opt.concat([
                                                    {
                                                        "type": "command",
                                                        "name": "pinned",
                                                        "optional": "pinned",
                                                        "description": '固定トゥートを表示します。',
                                                        "execute": this.show_statuses
                                                    }, {
                                                        "type": "command",
                                                        "name": "media",
                                                        "optional": "media",
                                                        "description": 'メディアトゥートを表示します。',
                                                        "execute": this.show_statuses
                                                    }
                                                ])
                                            }, {
                                                "type": "command",
                                                "name": "following",
                                                "description": 'フォローアカウントを表示します。',
                                                "execute": this.show_follows
                                            }, {
                                                "type": "command",
                                                "name": "followers",
                                                "description": 'フォロワーアカウントを表示します。',
                                                "execute": this.show_follows,
                                            }
                                        ]
                                    }
                                ]
                            }, {
                                "type": "command",
                                "name": "self",
                                "description": 'ログインユーザー',
                                "execute": this.show_user,
                                "children": [
                                    {
                                        "type": "command",
                                        "name": "statuses",
                                        "description": 'ユーザの最新トゥートを表示',
                                        "execute": this.show_statuses,
                                        "children": this._sh_stats_opt
                                        /*"children": [
                                            {
                                                "type": "command",
                                                "name": "limit",
                                                "description": 'トゥート表示件数を設定します。',
                                                "children": [
                                                    {
                                                        "type": "number",
                                                        "name": "post_limits",
                                                        "min": 1,
                                                        "max": 40,
                                                        "description": 'トゥート数(初期値20)',
                                                        "execute": this.show_statuses
                                                    }
                                                ]
                                            }, {
                                                "type": "command",
                                                "name": "pinned",
                                                "optional": "pinned",
                                                "description": '固定トゥートを表示します。',
                                                "execute": this.show_statuses
                                            }
                                        ]*/
                                    }, {
                                        "type": "command",
                                        "name": "following",
                                        "description": 'フォローアカウントを表示します。',
                                        "execute": this.show_follows
                                    }, {
                                        "type": "command",
                                        "name": "followers",
                                        "description": 'フォロワーアカウントを表示します。',
                                        "execute": this.show_follows,
                                    }
                                ]
                            }, {
                                "type": "command",
                                "name": "name",
                                "description": 'ユーザ名・アカウント名から検索表示',
                                "children": [
                                    {
                                        "type": "paramater",
                                        "name": "account",
                                        "description": 'ユーザ名・アカウント名',
                                        "execute": this.show_user,
                                    }
                                ]
                            }
                        ]
                    }, {
                        "type": "command",
                        "name": "instance",
                        "description": 'インスタンス情報を表示します。',
                        "execute": this.show_instance,
                    }, {
                        "type": "command",
                        "name": "application",
                        "description": 'クライアント情報を表示します。',
                        "execute": this.show_application,
                    }, {
                        "type": "command",
                        "name": "timeline",
                        "description": 'タイムラインの最新トゥートを表示します。',
                        "execute": this.show_statuses,
                        "children": [
                            {
                                "type": "command",
                                "name": "home",
                                "description": 'ホームタイムライン',
                                "execute": this.show_statuses,
                                "children": this._sh_stats_opt
                            }, {
                                "type": "command",
                                "name": "local",
                                "description": 'ローカルタイムライン',
                                "execute": this.show_statuses,
                                "children": this._sh_stats_opt
                            }, {
                                "type": "command",
                                "name": "public",
                                "description": '連合タイムライン',
                                "execute": this.show_statuses,
                                "children": this._sh_stats_opt
                            }, {
                                "type": "command",
                                "name": "tag",
                                "description": 'ハッシュタグ',
                                "children": [
                                    {
                                        "type": "paramater",
                                        "name": "tag_name",
                                        "description": 'タグ名',
                                        "execute": this.show_statuses,
                                        "children": this._sh_stats_opt
                                    }
                                ]
                            }, {
                                "type": "command",
                                "name": "notifications",
                                "description": '通知タイムライン',
                                "execute": this.show_notifications,
                                "children": this._sh_stats_opt
                            }
                        ]
                    }, {
                        "type": "command",
                        "name": "statuses",
                        "description": 'トゥートを表示します。',
                        "children": [
                            {
                                "type": "command",
                                "name": "id",
                                "description": 'トゥートIDを指定',
                                "children": [
                                    {
                                        "type": "paramater",
                                        "name": "status_id",
                                        "description": 'トゥートID',
                                        "execute": this.show_status_id,
                                        "children": [
                                            {
                                                "type": "command",
                                                "name": "favourited",
                                                "description": 'お気に入りユーザー一覧',
                                                "execute": this.show_follows
                                            }, {
                                                "type": "command",
                                                "name": "reblogged",
                                                "description": 'ブーストユーザー一覧',
                                                "execute": this.show_follows
                                            }
                                        ]
                                    }
                                ]
                            }
                        ]
                    }
                ]
            }, {
                "type": "command",
                "name": "search",
                "description": "検索を行います",
                "children": [
                    {
                        "type": "command",
                        "name": "local",
                        "description": 'インスタンス内から検索します。',
                        "children": [
                            {
                                "type": "paramater",
                                "name": "query",
                                "description": '検索キーワード',
                                "execute": this.search_query,
                            }
                        ]
                    }, {
                        "type": "command",
                        "name": "tootsearch",
                        "description": 'tootsearchエンジンを利用して検索します。',
                        "children": [
                            {
                                "type": "paramater",
                                "name": "query",
                                "description": '検索キーワード',
                                "execute": this.search_query,
                            }
                        ]
                    }
                ]
            }, {
                "type": "command",
                "name": "login",
                "description": 'インスタンスにログインをし、アクセストークンを更新します',
                "execute": this.login,
            }, {
                "type": "command",
                "name": "terminal",
                "description": 'ストリーミングの設定を行います。',
                "execute": this.terminal_monitor,
                "children": [
                    {
                        "type": "command",
                        "name": "monitor",
                        "optional": "on_monitor",
                        "description": 'ストリーミングを有効にします。',
                        "execute": this.terminal_monitor,
                        "children": [
                            {
                                "type": "command",
                                "name": "notification",
{'fraction_non_alphanumeric': 0.09757819670973664, 'fraction_numerical': 0.0010826331521099578, 'mean_word_length': 0.49623212902317065, 'pattern_counts': {'":': 638, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 380, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7616888', 'n_tokens_mistral': 8711, 'n_tokens_neox': 7956, 'n_words': 1290}