[{"data":1,"prerenderedAt":9243},["ShallowReactive",2],{"posts":3,"search-data":5103,"latest-posts":5316},[4,228,562,774,878,1454,1593,1777,1975,2243,4470,4568,4612],{"id":5,"title":6,"body":7,"categories":214,"cross_post":215,"date":216,"description":217,"extension":218,"image":20,"meta":219,"navigation":31,"note_id":215,"note_url":215,"path":220,"private":221,"qiita_id":215,"qiita_url":215,"seo":222,"stem":223,"tags":224,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":227},"posts/posts/1064.md","javascript 配列",{"type":8,"value":9,"toc":211},"minimal",[10,14,207],[11,12,13],"h2",{"id":13},"操作",[15,16,21],"pre",{"className":17,"code":18,"language":19,"meta":20,"style":20},"language-javascript shiki shiki-themes github-light github-dark","\nconst  arr = []\n\n// 先頭を削除\narr.shift() ;\n\n// 末尾を削除\narr.pop() ;\n\n// 配列合計\ndata.reduce((a, x) =>{return a + ((x || 0) - 0);}, 0);\n\n// 配列から新しい配列\nconst count = Array.from(line)\n\n// 配列を空,null undefined を削除\narr.filter((v) => v\n// 配列の要素すべてが条件を満たしているか\n  o = s.every(isUpperCase)\n//配列の要素一つでも条件を満たしているか\narr.some()\n//配列のkeyを取得\narr_key = Object.keys(arr)\n// 配列に引数の値が含まれているかどうか\narr_key.includes(x)\n//配列の順番を逆に\narr.reverse()\n\n// 配列の重複削除\nconst array1 = [1, 5, 3, 1, 5, 3];\nconst array2 = Array.from(new Set(array1))\n\n","javascript","",[22,23,24,33,39,44,50,56,61,67,73,78,84,90,95,101,107,112,118,124,130,136,142,148,154,160,166,172,178,184,189,195,201],"code",{"__ignoreMap":20},[25,26,29],"span",{"class":27,"line":28},"line",1,[25,30,32],{"emptyLinePlaceholder":31},true,"\n",[25,34,36],{"class":27,"line":35},2,[25,37,38],{},"const  arr = []\n",[25,40,42],{"class":27,"line":41},3,[25,43,32],{"emptyLinePlaceholder":31},[25,45,47],{"class":27,"line":46},4,[25,48,49],{},"// 先頭を削除\n",[25,51,53],{"class":27,"line":52},5,[25,54,55],{},"arr.shift() ;\n",[25,57,59],{"class":27,"line":58},6,[25,60,32],{"emptyLinePlaceholder":31},[25,62,64],{"class":27,"line":63},7,[25,65,66],{},"// 末尾を削除\n",[25,68,70],{"class":27,"line":69},8,[25,71,72],{},"arr.pop() ;\n",[25,74,76],{"class":27,"line":75},9,[25,77,32],{"emptyLinePlaceholder":31},[25,79,81],{"class":27,"line":80},10,[25,82,83],{},"// 配列合計\n",[25,85,87],{"class":27,"line":86},11,[25,88,89],{},"data.reduce((a, x) =>{return a + ((x || 0) - 0);}, 0);\n",[25,91,93],{"class":27,"line":92},12,[25,94,32],{"emptyLinePlaceholder":31},[25,96,98],{"class":27,"line":97},13,[25,99,100],{},"// 配列から新しい配列\n",[25,102,104],{"class":27,"line":103},14,[25,105,106],{},"const count = Array.from(line)\n",[25,108,110],{"class":27,"line":109},15,[25,111,32],{"emptyLinePlaceholder":31},[25,113,115],{"class":27,"line":114},16,[25,116,117],{},"// 配列を空,null undefined を削除\n",[25,119,121],{"class":27,"line":120},17,[25,122,123],{},"arr.filter((v) => v\n",[25,125,127],{"class":27,"line":126},18,[25,128,129],{},"// 配列の要素すべてが条件を満たしているか\n",[25,131,133],{"class":27,"line":132},19,[25,134,135],{},"  o = s.every(isUpperCase)\n",[25,137,139],{"class":27,"line":138},20,[25,140,141],{},"//配列の要素一つでも条件を満たしているか\n",[25,143,145],{"class":27,"line":144},21,[25,146,147],{},"arr.some()\n",[25,149,151],{"class":27,"line":150},22,[25,152,153],{},"//配列のkeyを取得\n",[25,155,157],{"class":27,"line":156},23,[25,158,159],{},"arr_key = Object.keys(arr)\n",[25,161,163],{"class":27,"line":162},24,[25,164,165],{},"// 配列に引数の値が含まれているかどうか\n",[25,167,169],{"class":27,"line":168},25,[25,170,171],{},"arr_key.includes(x)\n",[25,173,175],{"class":27,"line":174},26,[25,176,177],{},"//配列の順番を逆に\n",[25,179,181],{"class":27,"line":180},27,[25,182,183],{},"arr.reverse()\n",[25,185,187],{"class":27,"line":186},28,[25,188,32],{"emptyLinePlaceholder":31},[25,190,192],{"class":27,"line":191},29,[25,193,194],{},"// 配列の重複削除\n",[25,196,198],{"class":27,"line":197},30,[25,199,200],{},"const array1 = [1, 5, 3, 1, 5, 3];\n",[25,202,204],{"class":27,"line":203},31,[25,205,206],{},"const array2 = Array.from(new Set(array1))\n",[208,209,210],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":20,"searchDepth":35,"depth":35,"links":212},[213],{"id":13,"depth":35,"text":13},[19],null,"2021-04-24T00:00:00.000Z","JavaScriptの配列操作(shift/pop/reduce/filter/every/some/includes等)を使い方付きでまとめたメモ","md",{},"/posts/1064",false,{"title":6,"description":217},"posts/1064",[225,226],"javascprit","memo","rW_GaIDsBwJwl8o_eZz0yNuHwXpEQbgKszj5j66OS2g",{"id":229,"title":230,"body":231,"categories":550,"cross_post":215,"date":552,"description":553,"extension":218,"image":20,"meta":554,"navigation":31,"note_id":215,"note_url":215,"path":555,"private":221,"qiita_id":215,"qiita_url":215,"seo":556,"stem":557,"tags":558,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":561},"posts/posts/2024-review.md","2024年を振り返って",{"type":8,"value":232,"toc":543},[233,237,241,244,247,250,253,256,269,278,282,285,288,291,294,297,300,303,316,319,322,325,328,337,340,343,346,349,352,355,358,361,370,374,377,380,383,386,389,392,395,398,401,404,407,416,425,428,431,434,438,441,444,447,450,453,456,459,468,471,474,477,480,483,486,489,492,495,498,507,516,519,522,525,528,531,534,537,540],[11,234,236],{"id":235},"_13月","1~3月",[238,239,240],"p",{},"例年ながら、冬は寒いし日光なくてあんまり調子は出ないで",[238,242,243],{},"今年もローテンションで生活していました..",[238,245,246],{},"とはいえ",[238,248,249],{},"りんご農園さんの受注分析システムを作成したり",[238,251,252],{},"はじめて冬の戸隠神社に仲良くなったオーストラリア人でワーキングホリデーで日本に来た友達と",[238,254,255],{},"雪の中行ってみたりしました。",[238,257,258,261,267],{},[259,260],"br",{},[262,263],"iframe",{"src":264,"style":265,"frameBorder":266},"https://drive.google.com/viewer?srcid=1ZNigyxjgJNA8ZBWw213p2JPtEG5pa9aJ&pid=explorer&efh=false&a=v&chrome=false&embedded=true","width:300px; height:300px;","0",[259,268],{},[238,270,271,273,276],{},[259,272],{},[262,274],{"src":275,"style":265,"frameBorder":266},"https://drive.google.com/viewer?srcid=1pMSpEv11YoZqC_ctYznDY3MvTZdz3H_E&pid=explorer&efh=false&a=v&chrome=false&embedded=true",[259,277],{},[11,279,281],{"id":280},"_46月","4~6月",[238,283,284],{},"4月5月で東京でSIerの新人研修のサブ講師をしたのは新しい経験でした。",[238,286,287],{},"今まで子供にプログラミングを教えたりとか、",[238,289,290],{},"オンラインのプログラミング教室の講師の経験をしてきましたが",[238,292,293],{},"やはり対面でメイン講師ではないとはいえ100名以上を前に喋ったり",[238,295,296],{},"サポートするのは今までとはちがった経験で仕事を受けた時は意識していませんでしたが",[238,298,299],{},"チャレンジであり新しい価値観とスキルを身につけた気がします。",[238,301,302],{},"また、登山もことしも行き始め",[304,305,306,310,313],"ul",{},[307,308,309],"li",{},"見晴岳・三方ヶ峰・篭ノ登山(東篭ノ登山)",[307,311,312],{},"飯綱山",[307,314,315],{},"蓼科山",[238,317,318],{},"に行きましたー。",[238,320,321],{},"ものすごい高い山ではないですが、",[238,323,324],{},"山頂でお湯を沸かしてカップラーメンとコーヒーは達成感あっていいものですね〜",[238,326,327],{},"帰りに、温泉に寄ってくるのも定番です！",[238,329,330,332,335],{},[259,331],{},[262,333],{"src":334,"style":265,"frameBorder":266},"https://drive.google.com/viewer?srcid=1H0UBDszh3o_635R8-u5oAeRigbkx55dg&pid=explorer&efh=false&a=v&chrome=false&embedded=true",[259,336],{},[238,338,339],{},"そして、今年の大きな旅行１つ目",[238,341,342],{},"台湾にも１人旅をしてきました。",[238,344,345],{},"今まで海外は誰かと一緒でしたので今回",[238,347,348],{},"全ての手配も一人でやり一人で台湾に行って帰ってきたのは",[238,350,351],{},"旅行の楽しさも凄くありましたが、",[238,353,354],{},"より色々なとこにフットワーク軽く移動できるようになった気がして嬉しかったです。",[238,356,357],{},"それから台湾は英語あまり通じなかったですが、同じホステルの人とかと頑張って喋ってみて",[238,359,360],{},"前よりも英語も上達している気がしたのも嬉しかったです。",[238,362,363,365,368],{},[259,364],{},[262,366],{"src":367,"style":265,"frameBorder":266},"https://drive.google.com/viewer?srcid=1WlUr1YDksAX4nLRQmwuR9G3BUUcnGxCV&pid=explorer&efh=false&a=v&chrome=false&embedded=true",[259,369],{},[11,371,373],{"id":372},"_79月","7~9月",[238,375,376],{},"暑すぎてあまり引きこもり気味でした…",[238,378,379],{},"それでも",[238,381,382],{},"松本の花火や穂高神社の花火に行ったりしました。",[238,384,385],{},"そして今年の大きな旅行２つ目",[238,387,388],{},"青春18きっぷで北海道まで行ったことです。",[238,390,391],{},"青春18きっぷが今年で無くなるのではないかとの噂を聞いて",[238,393,394],{},"今まで１回もチャレンジしたことなかったので",[238,396,397],{},"長野からどこまで行けるか調べてチャレンジしてみました。",[238,399,400],{},"フェリーに乗る必要があるとはいえ函館まで行きさらに札幌までいってきました！",[238,402,403],{},"じつはこのルート青春18きっぷの改訂でこの冬からは同じ手段ではいけなくなっていまいました。",[238,405,406],{},"ちゃんと夏のシーズンにいってよかったな思いました。",[238,408,409,411,414],{},[259,410],{},[262,412],{"src":413,"style":265,"frameBorder":266},"https://drive.google.com/viewer?srcid=1d5_ZDcg1bq_BYWCNivb4XSqmRNA0f8s3&pid=explorer&efh=false&a=v&chrome=false&embedded=true",[259,415],{},[238,417,418,420,423],{},[259,419],{},[262,421],{"src":422,"style":265,"frameBorder":266},"https://drive.google.com/viewer?srcid=1kOoSs5Py_ln7tIOIQNXvv2fd12R1HXbS&pid=explorer&efh=false&a=v&chrome=false&embedded=true",[259,424],{},[238,426,427],{},"山にも登りました、",[238,429,430],{},"9月の少し涼しくなってきたタイミングで",[238,432,433],{},"烏帽子岳と湯ノ丸山にいってきましたー",[11,435,437],{"id":436},"_1012月","10~12月",[238,439,440],{},"前半登山とキャンプ",[238,442,443],{},"根子岳と四阿山にいってきました。",[238,445,446],{},"キャンプは子安温泉キャンプ所で！",[238,448,449],{},"今回一緒に行ったメンバーが焚き火台を持ってきてくれて",[238,451,452],{},"初めてキャンプで焚き火を焚き火で魚や肉を焼いたりして",[238,454,455],{},"炎を眺めるのもいいですし、焚き火で作った料理は美味しいしで",[238,457,458],{},"僕も焚き火台が欲しくなりました…",[238,460,461,463,466],{},[259,462],{},[262,464],{"src":465,"style":265,"frameBorder":266},"https://drive.google.com/viewer?srcid=1vR5tfYQ5BKvAPrOAMui4c24vvGe0yo44&pid=explorer&efh=false&a=v&chrome=false&embedded=true",[259,467],{},[238,469,470],{},"そして今年３つ目の大きな旅行で",[238,472,473],{},"出雲へいってきました",[238,475,476],{},"東京からサンライズ出雲の寝台列車に乗ることができて嬉しかったです！",[238,478,479],{},"日本で唯一毎日運行されている寝台特急ということで",[238,481,482],{},"乗れるうちに乗ってみたかったのですが、今回その目標も叶いました〜",[238,484,485],{},"出雲で出雲大社と周辺の神社、それから松江で宿泊し、松江城や歴史館",[238,487,488],{},"そして世界遺産の石見銀山の構成遺産の温泉津に泊まって",[238,490,491],{},"翌日石見銀山へ",[238,493,494],{},"なかなか関西より西に行くことが少ないので色々回れておもしろかったし、",[238,496,497],{},"歴史も垣間見れる場所もいけてよかったです。",[238,499,500,502,505],{},[259,501],{},[262,503],{"src":504,"style":265,"frameBorder":266},"https://drive.google.com/viewer?srcid=1HLBYL8UOTYv5efg5_m-Z6Stmnzg0fR9_&pid=explorer&efh=false&a=v&chrome=false&embedded=true",[259,506],{},[238,508,509,511,514],{},[259,510],{},[262,512],{"src":513,"style":265,"frameBorder":266},"https://drive.google.com/viewer?srcid=1Bec0WqpRYjwK6Fvdt1JgXF9UHPhjq_7Y&pid=explorer&efh=false&a=v&chrome=false&embedded=true",[259,515],{},[11,517,518],{"id":518},"まとめ",[238,520,521],{},"今年は結構旅行など意外に外出が多かった年でした〜",[238,523,524],{},"仕事ではフリーランスになって１年目で変化が多かったですが",[238,526,527],{},"りんご農園さんのDX支援は講師をしてみたりで新たな自分の可能性を広げられたかなと思ってます。",[238,529,530],{},"あと、地味に夏からダイエットをしてるのです、12月末で7kg痩せていて",[238,532,533],{},"自分でもびっくりですが結構嬉しいです！",[238,535,536],{},"あと2kg痩せてそこから筋肉つけれる方向に向かっていければなって考えてますね〜",[238,538,539],{},"来年の目標は年始にまた考えますが、もうちょい痩せて、もうちょい英語喋れるようになるのは",[238,541,542],{},"頑張っていきたいところですね〜",{"title":20,"searchDepth":35,"depth":35,"links":544},[545,546,547,548,549],{"id":235,"depth":35,"text":236},{"id":280,"depth":35,"text":281},{"id":372,"depth":35,"text":373},{"id":436,"depth":35,"text":437},{"id":518,"depth":35,"text":518},[551],"日常","2024-12-31T00:00:00.000Z","2024年の振り返り。りんご農園の受注分析システム開発や戸隠神社への冬の旅など、この一年の出来事をまとめた",{},"/posts/2024-review",{"title":230,"description":553},"posts/2024-review",[559,560],"振り返り",2024,"hcqQECg5_b5lM3KrvHW_vEsywbW-6PwPztLfabEwl0E",{"id":563,"title":564,"body":565,"categories":764,"cross_post":215,"date":766,"description":767,"extension":218,"image":20,"meta":768,"navigation":31,"note_id":215,"note_url":215,"path":769,"private":221,"qiita_id":215,"qiita_url":215,"seo":770,"stem":771,"tags":772,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":773},"posts/posts/4456.md","firebase firestore データ取得",{"type":8,"value":566,"toc":761},[567,570,758],[11,568,569],{"id":569},"データ取得コレクション全部",[15,571,575],{"className":572,"code":573,"language":574,"meta":20,"style":20},"language-typescript shiki shiki-themes github-light github-dark","firebase.initializeApp(firebaseConfig)\n\nconst firestore = firebase.firestore()\n\nconst querySnapshot = await firestore.collection('p0st')\n\n// firebase.firestore.QuerySnapshotのインスタンスを取得\nconsole.log(querySnapshot.size)\nconsole.log(querySnapshot.empty)\nconsole.log(querySnapshot.docs.map((postDoc) => postDoc.id))\nquerySnapshot.forEach((postDoc) => {\n  console.log([postDoc.id, JSON.stringify(postDoc.data())])\n})\n","typescript",[22,576,577,590,594,616,620,648,652,658,669,678,706,725,753],{"__ignoreMap":20},[25,578,579,583,587],{"class":27,"line":28},[25,580,582],{"class":581},"sVt8B","firebase.",[25,584,586],{"class":585},"sScJk","initializeApp",[25,588,589],{"class":581},"(firebaseConfig)\n",[25,591,592],{"class":27,"line":35},[25,593,32],{"emptyLinePlaceholder":31},[25,595,596,600,604,607,610,613],{"class":27,"line":41},[25,597,599],{"class":598},"szBVR","const",[25,601,603],{"class":602},"sj4cs"," firestore",[25,605,606],{"class":598}," =",[25,608,609],{"class":581}," firebase.",[25,611,612],{"class":585},"firestore",[25,614,615],{"class":581},"()\n",[25,617,618],{"class":27,"line":46},[25,619,32],{"emptyLinePlaceholder":31},[25,621,622,624,627,629,632,635,638,641,645],{"class":27,"line":52},[25,623,599],{"class":598},[25,625,626],{"class":602}," querySnapshot",[25,628,606],{"class":598},[25,630,631],{"class":598}," await",[25,633,634],{"class":581}," firestore.",[25,636,637],{"class":585},"collection",[25,639,640],{"class":581},"(",[25,642,644],{"class":643},"sZZnC","'p0st'",[25,646,647],{"class":581},")\n",[25,649,650],{"class":27,"line":58},[25,651,32],{"emptyLinePlaceholder":31},[25,653,654],{"class":27,"line":63},[25,655,657],{"class":656},"sJ8bj","// firebase.firestore.QuerySnapshotのインスタンスを取得\n",[25,659,660,663,666],{"class":27,"line":69},[25,661,662],{"class":581},"console.",[25,664,665],{"class":585},"log",[25,667,668],{"class":581},"(querySnapshot.size)\n",[25,670,671,673,675],{"class":27,"line":75},[25,672,662],{"class":581},[25,674,665],{"class":585},[25,676,677],{"class":581},"(querySnapshot.empty)\n",[25,679,680,682,684,687,690,693,697,700,703],{"class":27,"line":80},[25,681,662],{"class":581},[25,683,665],{"class":585},[25,685,686],{"class":581},"(querySnapshot.docs.",[25,688,689],{"class":585},"map",[25,691,692],{"class":581},"((",[25,694,696],{"class":695},"s4XuR","postDoc",[25,698,699],{"class":581},") ",[25,701,702],{"class":598},"=>",[25,704,705],{"class":581}," postDoc.id))\n",[25,707,708,711,714,716,718,720,722],{"class":27,"line":86},[25,709,710],{"class":581},"querySnapshot.",[25,712,713],{"class":585},"forEach",[25,715,692],{"class":581},[25,717,696],{"class":695},[25,719,699],{"class":581},[25,721,702],{"class":598},[25,723,724],{"class":581}," {\n",[25,726,727,730,732,735,738,741,744,747,750],{"class":27,"line":92},[25,728,729],{"class":581},"  console.",[25,731,665],{"class":585},[25,733,734],{"class":581},"([postDoc.id, ",[25,736,737],{"class":602},"JSON",[25,739,740],{"class":581},".",[25,742,743],{"class":585},"stringify",[25,745,746],{"class":581},"(postDoc.",[25,748,749],{"class":585},"data",[25,751,752],{"class":581},"())])\n",[25,754,755],{"class":27,"line":97},[25,756,757],{"class":581},"})\n",[208,759,760],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":20,"searchDepth":35,"depth":35,"links":762},[763],{"id":569,"depth":35,"text":569},[765],"firebase","2021-04-20T00:00:00.000Z","FirebaseのFirestoreからコレクション内の全ドキュメントを取得するTypeScriptのサンプルコード",{},"/posts/4456",{"title":564,"description":767},"posts/4456",[765,612,574],"_6bC5HkhYk9U-Ihf-VZwIsYGtwpC6ubOa1j877FGMD0",{"id":775,"title":776,"body":777,"categories":869,"cross_post":215,"date":870,"description":871,"extension":218,"image":20,"meta":872,"navigation":31,"note_id":215,"note_url":215,"path":873,"private":221,"qiita_id":215,"qiita_url":215,"seo":874,"stem":875,"tags":876,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":877},"posts/posts/4621.md","javascript 年月の差分、日にちの差分",{"type":8,"value":778,"toc":865},[779,782,785,829,832,835,863],[11,780,781],{"id":781},"月の差分",[238,783,784],{},"何月前か後ろかを整数で返す",[15,786,788],{"className":17,"code":787,"language":19,"meta":20,"style":20},"//  js月の比較\nconst date1 = new Date(2021, 1, 1)\nconst date2 = new Date(2021, 12, 11)\n\nlet months\nmonths = (date2.getFullYear() - date1.getFullYear()) * 12\nmonths -= date1.getMonth() + 1\nmonths += date2.getMonth() + 1\n",[22,789,790,795,800,805,809,814,819,824],{"__ignoreMap":20},[25,791,792],{"class":27,"line":28},[25,793,794],{},"//  js月の比較\n",[25,796,797],{"class":27,"line":35},[25,798,799],{},"const date1 = new Date(2021, 1, 1)\n",[25,801,802],{"class":27,"line":41},[25,803,804],{},"const date2 = new Date(2021, 12, 11)\n",[25,806,807],{"class":27,"line":46},[25,808,32],{"emptyLinePlaceholder":31},[25,810,811],{"class":27,"line":52},[25,812,813],{},"let months\n",[25,815,816],{"class":27,"line":58},[25,817,818],{},"months = (date2.getFullYear() - date1.getFullYear()) * 12\n",[25,820,821],{"class":27,"line":63},[25,822,823],{},"months -= date1.getMonth() + 1\n",[25,825,826],{"class":27,"line":69},[25,827,828],{},"months += date2.getMonth() + 1\n",[11,830,831],{"id":831},"日の差分",[238,833,834],{},"単純に日数の差分を返す",[15,836,838],{"className":17,"code":837,"language":19,"meta":20,"style":20},"//  js日差分\nconst date1 = new Date(2021, 1, 1)\nconst date2 = new Date(2021, 12, 11)\nconst termDay = (date2 - date1) / 86400000\nconsole.log(termDay)\n",[22,839,840,845,849,853,858],{"__ignoreMap":20},[25,841,842],{"class":27,"line":28},[25,843,844],{},"//  js日差分\n",[25,846,847],{"class":27,"line":35},[25,848,799],{},[25,850,851],{"class":27,"line":41},[25,852,804],{},[25,854,855],{"class":27,"line":46},[25,856,857],{},"const termDay = (date2 - date1) / 86400000\n",[25,859,860],{"class":27,"line":52},[25,861,862],{},"console.log(termDay)\n",[208,864,210],{},{"title":20,"searchDepth":35,"depth":35,"links":866},[867,868],{"id":781,"depth":35,"text":781},{"id":831,"depth":35,"text":831},[19],"2021-04-28T00:00:00.000Z","JavaScriptで2つの日付から月の差分・日にちの差分を計算するコードのメモ",{},"/posts/4621",{"title":776,"description":871},"posts/4621",[19,226],"u8OAQB-t7QX_VA81OWKiOGTOI8qymwoavvyIXRZq27Q",{"id":879,"title":880,"body":881,"categories":1442,"cross_post":215,"date":1444,"description":1445,"extension":218,"image":20,"meta":1446,"navigation":31,"note_id":215,"note_url":215,"path":1447,"private":221,"qiita_id":215,"qiita_url":215,"seo":1448,"stem":1449,"tags":1450,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":1453},"posts/posts/gas-checkRakutenPayEmailsAndLogDaily.md","楽天payと楽天キャッシュの入出金を毎日GAS(google app script)で取得してみる",{"type":8,"value":882,"toc":1433},[883,888,891,894,897,900,908,911,914,918,929,1187,1189,1193,1203,1207,1388,1390,1394,1401,1420,1422,1425,1428,1431],[884,885,887],"h1",{"id":886},"gmailを自動解析楽天payと楽天キャッシュの利用情報をスプレッドシートに記録するスクリプト","Gmailを自動解析！楽天Payと楽天キャッシュの利用情報をスプレッドシートに記録するスクリプト",[11,889,890],{"id":890},"はじめに",[238,892,893],{},"日々の支出管理やキャッシュフローの可視化は大切ですよね？",[238,895,896],{},"僕は基本的に支払いは電子決済で済ませてるので大体の履歴はマネーフォワードに連携して",[238,898,899],{},"そこで見ているですが、実は楽天pay,PayPay,ANApayなどは連携していなく",[238,901,902,903,907],{},"アプリでしかみることができないので今回\n「楽天Pay」や「楽天キャッシュ」の利用履歴を自動で取得して、スプレッドシートに保存してBIで見れたら便利だと思いやってみました\n今回は ",[904,905,906],"strong",{},"Google Apps Script (GAS)"," を使って、Gmailから自動で利用情報を取得し、Googleスプレッドシートに記録するスクリプトを作成します。",[238,909,910],{},"また、基本的に楽天payの支払いを楽天キャッシュからしているので支払いとチャージ料方法を取得するコードもつくりました。",[912,913],"hr",{},[11,915,917],{"id":916},"_1-楽天pay版スクリプト","1. 楽天Pay版スクリプト",[304,919,920,923,926],{},[307,921,922],{},"Gmailの「楽天Payアプリご利用内容確認メール」を解析。",[307,924,925],{},"利用日時、店舗名、伝票番号、決済総額などを抽出。",[307,927,928],{},"データをGoogleスプレッドシートに自動で記録。",[15,930,932],{"className":17,"code":931,"language":19,"meta":20,"style":20},"\n\nfunction checkRakutenPayEmailsAndLogDaily() {\n  const sheetId = \"YOUR_SPREADSHEET_ID\"; // スプレッドシートIDを指定\n  const sheetName = \"楽天Payログ\"; // シート名を指定\n\n  const today = new Date();\n  today.setHours(0, 0, 0, 0);\n  const yesterday = new Date(today);\n  yesterday.setDate(today.getDate() - 1);\n  const startDate = Utilities.formatDate(yesterday, Session.getScriptTimeZone(), \"yyyy/MM/dd\");\n  const endDate = Utilities.formatDate(today, Session.getScriptTimeZone(), \"yyyy/MM/dd\");\n\n  const searchQuery = `from:no-reply@pay.rakuten.co.jp subject:\"楽天ペイアプリご利用内容確認メール\" after:${startDate} before:${endDate}`;\n  const sheet = SpreadsheetApp.openById(sheetId).getSheetByName(sheetName);\n  if (!sheet) throw new Error(`シート \"${sheetName}\" が見つかりません`);\n\n  const threads = GmailApp.search(searchQuery);\n  if (threads.length === 0) {\n    console.log(\"前日分の対象メールはありません。\");\n    return;\n  }\n\n  threads.forEach(thread => {\n    const messages = thread.getMessages();\n    messages.forEach(message => {\n      const body = message.getPlainBody();\n      let date, receiptNumber, store, totalAmount, points, paymentMethod;\n\n      const dateMatch = body.match(/ご利用日時\\s+([\\d/]+\\(.\\)\\s+[\\d:]+)/);\n      const receiptMatch = body.match(/伝票番号\\s+([A-Z0-9-]+)/);\n      const storeMatch = body.match(/ご利用店舗\\s+(.+)/);\n      const totalAmountMatch = body.match(/決済総額\\s+¥([\\d,]+)/);\n      const pointsMatch = body.match(/ポイント\\s+([\\d,]+)/);\n      const paymentMatch = body.match(/お取引内容\\s+(.+)/);\n\n      date = dateMatch ? dateMatch[1] : \"不明\";\n      receiptNumber = receiptMatch ? receiptMatch[1] : \"不明\";\n      store = storeMatch ? storeMatch[1].trim() : \"不明\";\n      totalAmount = totalAmountMatch ? totalAmountMatch[1].replace(/,/g, '') : \"0\";\n      points = pointsMatch ? pointsMatch[1] : \"0\";\n      paymentMethod = paymentMatch ? paymentMatch[1].trim() : \"不明\";\n\n      sheet.appendRow([new Date(), date, receiptNumber, store, `¥${totalAmount}`, points, paymentMethod]);\n    });\n  });\n\n  console.log(\"前日分の楽天ペイのメール内容をスプレッドシートに記録しました。\");\n}\n\n",[22,933,934,938,942,947,952,957,961,966,971,976,981,986,991,995,1000,1005,1010,1014,1019,1024,1029,1034,1039,1043,1048,1053,1058,1063,1068,1072,1077,1082,1088,1094,1100,1106,1111,1117,1123,1129,1135,1141,1147,1152,1158,1164,1170,1175,1181],{"__ignoreMap":20},[25,935,936],{"class":27,"line":28},[25,937,32],{"emptyLinePlaceholder":31},[25,939,940],{"class":27,"line":35},[25,941,32],{"emptyLinePlaceholder":31},[25,943,944],{"class":27,"line":41},[25,945,946],{},"function checkRakutenPayEmailsAndLogDaily() {\n",[25,948,949],{"class":27,"line":46},[25,950,951],{},"  const sheetId = \"YOUR_SPREADSHEET_ID\"; // スプレッドシートIDを指定\n",[25,953,954],{"class":27,"line":52},[25,955,956],{},"  const sheetName = \"楽天Payログ\"; // シート名を指定\n",[25,958,959],{"class":27,"line":58},[25,960,32],{"emptyLinePlaceholder":31},[25,962,963],{"class":27,"line":63},[25,964,965],{},"  const today = new Date();\n",[25,967,968],{"class":27,"line":69},[25,969,970],{},"  today.setHours(0, 0, 0, 0);\n",[25,972,973],{"class":27,"line":75},[25,974,975],{},"  const yesterday = new Date(today);\n",[25,977,978],{"class":27,"line":80},[25,979,980],{},"  yesterday.setDate(today.getDate() - 1);\n",[25,982,983],{"class":27,"line":86},[25,984,985],{},"  const startDate = Utilities.formatDate(yesterday, Session.getScriptTimeZone(), \"yyyy/MM/dd\");\n",[25,987,988],{"class":27,"line":92},[25,989,990],{},"  const endDate = Utilities.formatDate(today, Session.getScriptTimeZone(), \"yyyy/MM/dd\");\n",[25,992,993],{"class":27,"line":97},[25,994,32],{"emptyLinePlaceholder":31},[25,996,997],{"class":27,"line":103},[25,998,999],{},"  const searchQuery = `from:no-reply@pay.rakuten.co.jp subject:\"楽天ペイアプリご利用内容確認メール\" after:${startDate} before:${endDate}`;\n",[25,1001,1002],{"class":27,"line":109},[25,1003,1004],{},"  const sheet = SpreadsheetApp.openById(sheetId).getSheetByName(sheetName);\n",[25,1006,1007],{"class":27,"line":114},[25,1008,1009],{},"  if (!sheet) throw new Error(`シート \"${sheetName}\" が見つかりません`);\n",[25,1011,1012],{"class":27,"line":120},[25,1013,32],{"emptyLinePlaceholder":31},[25,1015,1016],{"class":27,"line":126},[25,1017,1018],{},"  const threads = GmailApp.search(searchQuery);\n",[25,1020,1021],{"class":27,"line":132},[25,1022,1023],{},"  if (threads.length === 0) {\n",[25,1025,1026],{"class":27,"line":138},[25,1027,1028],{},"    console.log(\"前日分の対象メールはありません。\");\n",[25,1030,1031],{"class":27,"line":144},[25,1032,1033],{},"    return;\n",[25,1035,1036],{"class":27,"line":150},[25,1037,1038],{},"  }\n",[25,1040,1041],{"class":27,"line":156},[25,1042,32],{"emptyLinePlaceholder":31},[25,1044,1045],{"class":27,"line":162},[25,1046,1047],{},"  threads.forEach(thread => {\n",[25,1049,1050],{"class":27,"line":168},[25,1051,1052],{},"    const messages = thread.getMessages();\n",[25,1054,1055],{"class":27,"line":174},[25,1056,1057],{},"    messages.forEach(message => {\n",[25,1059,1060],{"class":27,"line":180},[25,1061,1062],{},"      const body = message.getPlainBody();\n",[25,1064,1065],{"class":27,"line":186},[25,1066,1067],{},"      let date, receiptNumber, store, totalAmount, points, paymentMethod;\n",[25,1069,1070],{"class":27,"line":191},[25,1071,32],{"emptyLinePlaceholder":31},[25,1073,1074],{"class":27,"line":197},[25,1075,1076],{},"      const dateMatch = body.match(/ご利用日時\\s+([\\d/]+\\(.\\)\\s+[\\d:]+)/);\n",[25,1078,1079],{"class":27,"line":203},[25,1080,1081],{},"      const receiptMatch = body.match(/伝票番号\\s+([A-Z0-9-]+)/);\n",[25,1083,1085],{"class":27,"line":1084},32,[25,1086,1087],{},"      const storeMatch = body.match(/ご利用店舗\\s+(.+)/);\n",[25,1089,1091],{"class":27,"line":1090},33,[25,1092,1093],{},"      const totalAmountMatch = body.match(/決済総額\\s+¥([\\d,]+)/);\n",[25,1095,1097],{"class":27,"line":1096},34,[25,1098,1099],{},"      const pointsMatch = body.match(/ポイント\\s+([\\d,]+)/);\n",[25,1101,1103],{"class":27,"line":1102},35,[25,1104,1105],{},"      const paymentMatch = body.match(/お取引内容\\s+(.+)/);\n",[25,1107,1109],{"class":27,"line":1108},36,[25,1110,32],{"emptyLinePlaceholder":31},[25,1112,1114],{"class":27,"line":1113},37,[25,1115,1116],{},"      date = dateMatch ? dateMatch[1] : \"不明\";\n",[25,1118,1120],{"class":27,"line":1119},38,[25,1121,1122],{},"      receiptNumber = receiptMatch ? receiptMatch[1] : \"不明\";\n",[25,1124,1126],{"class":27,"line":1125},39,[25,1127,1128],{},"      store = storeMatch ? storeMatch[1].trim() : \"不明\";\n",[25,1130,1132],{"class":27,"line":1131},40,[25,1133,1134],{},"      totalAmount = totalAmountMatch ? totalAmountMatch[1].replace(/,/g, '') : \"0\";\n",[25,1136,1138],{"class":27,"line":1137},41,[25,1139,1140],{},"      points = pointsMatch ? pointsMatch[1] : \"0\";\n",[25,1142,1144],{"class":27,"line":1143},42,[25,1145,1146],{},"      paymentMethod = paymentMatch ? paymentMatch[1].trim() : \"不明\";\n",[25,1148,1150],{"class":27,"line":1149},43,[25,1151,32],{"emptyLinePlaceholder":31},[25,1153,1155],{"class":27,"line":1154},44,[25,1156,1157],{},"      sheet.appendRow([new Date(), date, receiptNumber, store, `¥${totalAmount}`, points, paymentMethod]);\n",[25,1159,1161],{"class":27,"line":1160},45,[25,1162,1163],{},"    });\n",[25,1165,1167],{"class":27,"line":1166},46,[25,1168,1169],{},"  });\n",[25,1171,1173],{"class":27,"line":1172},47,[25,1174,32],{"emptyLinePlaceholder":31},[25,1176,1178],{"class":27,"line":1177},48,[25,1179,1180],{},"  console.log(\"前日分の楽天ペイのメール内容をスプレッドシートに記録しました。\");\n",[25,1182,1184],{"class":27,"line":1183},49,[25,1185,1186],{},"}\n",[912,1188],{},[11,1190,1192],{"id":1191},"_2-楽天キャッシュ版スクリプト","2. 楽天キャッシュ版スクリプト",[304,1194,1195,1198,1201],{},[307,1196,1197],{},"Gmailの「楽天キャッシュチャージ完了メール」を解析。",[307,1199,1200],{},"取引日時、チャージ内容、金額を抽出。",[307,1202,928],{},[1204,1205,1206],"h3",{"id":1206},"スクリプトコード",[15,1208,1210],{"className":17,"code":1209,"language":19,"meta":20,"style":20},"function checkRakutenCashEmailsAndLogDaily() {\n  const sheetId = \"YOUR_SPREADSHEET_ID\"; // スプレッドシートIDを指定\n  const sheetName = \"楽天キャッシュログ\"; // シート名を指定\n\n  const today = new Date();\n  today.setHours(0, 0, 0, 0);\n  const yesterday = new Date(today);\n  yesterday.setDate(today.getDate() - 1);\n  const startDate = Utilities.formatDate(yesterday, Session.getScriptTimeZone(), \"yyyy/MM/dd\");\n  const endDate = Utilities.formatDate(today, Session.getScriptTimeZone(), \"yyyy/MM/dd\");\n\n  const searchQuery = `from:pointcharge@edy.rakuten.co.jp subject:\"【楽天キャッシュ】チャージ完了のお知らせ\" after:${startDate} before:${endDate}`;\n  const sheet = SpreadsheetApp.openById(sheetId).getSheetByName(sheetName);\n  if (!sheet) throw new Error(`シート \"${sheetName}\" が見つかりません`);\n\n  const threads = GmailApp.search(searchQuery);\n  if (threads.length === 0) {\n    console.log(\"前日分の対象メールはありません。\");\n    return;\n  }\n\n  threads.forEach(thread => {\n    const messages = thread.getMessages();\n    messages.forEach(message => {\n      const body = message.getPlainBody();\n      let transactionDate, content, amount;\n\n      const dateMatch = body.match(/\\[取引日時\\]\\s+([\\d/]+\\s+[\\d:]+)/);\n      const contentMatch = body.match(/\\[内容\\]\\s+(.+)/);\n      const amountMatch = body.match(/\\[金額\\]\\s+([\\d,]+)円/);\n\n      transactionDate = dateMatch ? dateMatch[1] : \"不明\";\n      content = contentMatch ? contentMatch[1].trim() : \"不明\";\n      amount = amountMatch ? amountMatch[1].replace(/,/g, '') : \"0\";\n\n      sheet.appendRow([new Date(), transactionDate, content, `¥${amount}`]);\n    });\n  });\n\n  console.log(\"前日分の楽天キャッシュのメール内容をスプレッドシートに記録しました。\");\n}\n\n",[22,1211,1212,1217,1221,1226,1230,1234,1238,1242,1246,1250,1254,1258,1263,1267,1271,1275,1279,1283,1287,1291,1295,1299,1303,1307,1311,1315,1320,1324,1329,1334,1339,1343,1348,1353,1358,1362,1367,1371,1375,1379,1384],{"__ignoreMap":20},[25,1213,1214],{"class":27,"line":28},[25,1215,1216],{},"function checkRakutenCashEmailsAndLogDaily() {\n",[25,1218,1219],{"class":27,"line":35},[25,1220,951],{},[25,1222,1223],{"class":27,"line":41},[25,1224,1225],{},"  const sheetName = \"楽天キャッシュログ\"; // シート名を指定\n",[25,1227,1228],{"class":27,"line":46},[25,1229,32],{"emptyLinePlaceholder":31},[25,1231,1232],{"class":27,"line":52},[25,1233,965],{},[25,1235,1236],{"class":27,"line":58},[25,1237,970],{},[25,1239,1240],{"class":27,"line":63},[25,1241,975],{},[25,1243,1244],{"class":27,"line":69},[25,1245,980],{},[25,1247,1248],{"class":27,"line":75},[25,1249,985],{},[25,1251,1252],{"class":27,"line":80},[25,1253,990],{},[25,1255,1256],{"class":27,"line":86},[25,1257,32],{"emptyLinePlaceholder":31},[25,1259,1260],{"class":27,"line":92},[25,1261,1262],{},"  const searchQuery = `from:pointcharge@edy.rakuten.co.jp subject:\"【楽天キャッシュ】チャージ完了のお知らせ\" after:${startDate} before:${endDate}`;\n",[25,1264,1265],{"class":27,"line":97},[25,1266,1004],{},[25,1268,1269],{"class":27,"line":103},[25,1270,1009],{},[25,1272,1273],{"class":27,"line":109},[25,1274,32],{"emptyLinePlaceholder":31},[25,1276,1277],{"class":27,"line":114},[25,1278,1018],{},[25,1280,1281],{"class":27,"line":120},[25,1282,1023],{},[25,1284,1285],{"class":27,"line":126},[25,1286,1028],{},[25,1288,1289],{"class":27,"line":132},[25,1290,1033],{},[25,1292,1293],{"class":27,"line":138},[25,1294,1038],{},[25,1296,1297],{"class":27,"line":144},[25,1298,32],{"emptyLinePlaceholder":31},[25,1300,1301],{"class":27,"line":150},[25,1302,1047],{},[25,1304,1305],{"class":27,"line":156},[25,1306,1052],{},[25,1308,1309],{"class":27,"line":162},[25,1310,1057],{},[25,1312,1313],{"class":27,"line":168},[25,1314,1062],{},[25,1316,1317],{"class":27,"line":174},[25,1318,1319],{},"      let transactionDate, content, amount;\n",[25,1321,1322],{"class":27,"line":180},[25,1323,32],{"emptyLinePlaceholder":31},[25,1325,1326],{"class":27,"line":186},[25,1327,1328],{},"      const dateMatch = body.match(/\\[取引日時\\]\\s+([\\d/]+\\s+[\\d:]+)/);\n",[25,1330,1331],{"class":27,"line":191},[25,1332,1333],{},"      const contentMatch = body.match(/\\[内容\\]\\s+(.+)/);\n",[25,1335,1336],{"class":27,"line":197},[25,1337,1338],{},"      const amountMatch = body.match(/\\[金額\\]\\s+([\\d,]+)円/);\n",[25,1340,1341],{"class":27,"line":203},[25,1342,32],{"emptyLinePlaceholder":31},[25,1344,1345],{"class":27,"line":1084},[25,1346,1347],{},"      transactionDate = dateMatch ? dateMatch[1] : \"不明\";\n",[25,1349,1350],{"class":27,"line":1090},[25,1351,1352],{},"      content = contentMatch ? contentMatch[1].trim() : \"不明\";\n",[25,1354,1355],{"class":27,"line":1096},[25,1356,1357],{},"      amount = amountMatch ? amountMatch[1].replace(/,/g, '') : \"0\";\n",[25,1359,1360],{"class":27,"line":1102},[25,1361,32],{"emptyLinePlaceholder":31},[25,1363,1364],{"class":27,"line":1108},[25,1365,1366],{},"      sheet.appendRow([new Date(), transactionDate, content, `¥${amount}`]);\n",[25,1368,1369],{"class":27,"line":1113},[25,1370,1163],{},[25,1372,1373],{"class":27,"line":1119},[25,1374,1169],{},[25,1376,1377],{"class":27,"line":1125},[25,1378,32],{"emptyLinePlaceholder":31},[25,1380,1381],{"class":27,"line":1131},[25,1382,1383],{},"  console.log(\"前日分の楽天キャッシュのメール内容をスプレッドシートに記録しました。\");\n",[25,1385,1386],{"class":27,"line":1137},[25,1387,1186],{},[912,1389],{},[11,1391,1393],{"id":1392},"_3-トリガー設定","3. トリガー設定",[238,1395,1396,1397,1400],{},"どちらのスクリプトも毎日自動実行するには、Google Apps Script の ",[904,1398,1399],{},"トリガー機能"," を活用します。",[1402,1403,1404,1407,1410,1417],"ol",{},[307,1405,1406],{},"スクリプトエディタを開き、時計マーク（トリガー設定）をクリック。",[307,1408,1409],{},"「トリガーを追加」を選択。",[307,1411,1412,1413,1416],{},"必要なスクリプト関数（例: ",[22,1414,1415],{},"checkRakutenPayEmailsAndLogDaily","）を選択。",[307,1418,1419],{},"実行タイミングを「日付ベース」「午前1時」などに設定。",[912,1421],{},[11,1423,1424],{"id":1424},"終わりに",[238,1426,1427],{},"これで、毎日の支出やチャージ状況を取得できそうです。",[238,1429,1430],{},"これを元にBIなどでみるかもしくはマネーフォワードに自動的にスクレイピングのライブラリを使って登録するのもいいかもしれません。",[208,1432,210],{},{"title":20,"searchDepth":35,"depth":35,"links":1434},[1435,1436,1437,1440,1441],{"id":890,"depth":35,"text":890},{"id":916,"depth":35,"text":917},{"id":1191,"depth":35,"text":1192,"children":1438},[1439],{"id":1206,"depth":41,"text":1206},{"id":1392,"depth":35,"text":1393},{"id":1424,"depth":35,"text":1424},[1443],"IT","2024-12-11T00:00:00.000Z","Google Apps ScriptでGmailを自動解析し、楽天Pay・楽天キャッシュの利用履歴をスプレッドシートに毎日記録するスクリプトを作った話",{},"/posts/gas-checkrakutenpayemailsandlogdaily",{"title":880,"description":1445},"posts/gas-checkRakutenPayEmailsAndLogDaily",[1451,1452],"Javascript","Google App script","hgRysF3JRet6R-ag_dl2-4dbBzuEVnWAhRZhYcuLjeU",{"id":1455,"title":1456,"body":1457,"categories":1582,"cross_post":215,"date":1583,"description":1584,"extension":218,"image":20,"meta":1585,"navigation":31,"note_id":215,"note_url":215,"path":1586,"private":221,"qiita_id":215,"qiita_url":215,"seo":1587,"stem":1588,"tags":1589,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":1592},"posts/posts/gas-cloud-function-auth.md","Google App Script から Could Functions を実行するために",{"type":8,"value":1458,"toc":1578},[1459,1462,1465,1468,1471,1474,1485,1488,1541,1555,1562,1569,1576],[1204,1460,1461],{"id":1461},"経緯",[238,1463,1464],{},"Google App Scriptだけでは外部ライブラリを使ったりnpmを使ったりするのが難しいの",[238,1466,1467],{},"Cloud Functions で処理してデータを返してもらって作ろうと思った時の認証について",[238,1469,1470],{},"ひとまず簡易なやり方で",[11,1472,1473],{"id":1473},"結論",[304,1475,1476,1479,1482],{},[307,1477,1478],{},"GCPでOAuth 同意画面を作成",[307,1480,1481],{},"Google App Script側をOAuth 同意画面作ったGCPプロジェクト作成",[307,1483,1484],{},"appscript.jsonの編集してOAuthスコープの設定",[238,1486,1487],{},"あと下記のようなコードで認証できる",[15,1489,1491],{"className":17,"code":1490,"language":19,"meta":20,"style":20},"\nfunction myFunction() {\n  const url = \"https://xxxxxx.cloudfunctions.net/xxxxx\"\n  const res = UrlFetchApp.fetch(url, {\n    headers: {\n      Authorization: `Bearer ${ScriptApp.getIdentityToken()}`\n    }\n  })\n  console.log(res.getContentText()) // Fnctiionの結果\n}\n\n\n",[22,1492,1493,1497,1502,1507,1512,1517,1522,1527,1532,1537],{"__ignoreMap":20},[25,1494,1495],{"class":27,"line":28},[25,1496,32],{"emptyLinePlaceholder":31},[25,1498,1499],{"class":27,"line":35},[25,1500,1501],{},"function myFunction() {\n",[25,1503,1504],{"class":27,"line":41},[25,1505,1506],{},"  const url = \"https://xxxxxx.cloudfunctions.net/xxxxx\"\n",[25,1508,1509],{"class":27,"line":46},[25,1510,1511],{},"  const res = UrlFetchApp.fetch(url, {\n",[25,1513,1514],{"class":27,"line":52},[25,1515,1516],{},"    headers: {\n",[25,1518,1519],{"class":27,"line":58},[25,1520,1521],{},"      Authorization: `Bearer ${ScriptApp.getIdentityToken()}`\n",[25,1523,1524],{"class":27,"line":63},[25,1525,1526],{},"    }\n",[25,1528,1529],{"class":27,"line":69},[25,1530,1531],{},"  })\n",[25,1533,1534],{"class":27,"line":75},[25,1535,1536],{},"  console.log(res.getContentText()) // Fnctiionの結果\n",[25,1538,1539],{"class":27,"line":80},[25,1540,1186],{},[238,1542,1543,1550],{},[1544,1545,1549],"a",{"href":1546,"rel":1547},"https://qiita.com/venect_qiita/items/26634a32037e40a585089%C2%A5",[1548],"nofollow","GAS（GoogleAppsScript）から認証付きのCloud Functionsをサービスアカウントを使用して呼び出す #GoogleCloud - Qiita",[1544,1551,1554],{"href":1552,"rel":1553},"https://qiita.com/kyhei_0727/items/d6b1cb33ce90b99e8129#oauth%E5%90%8C%E6%84%8F%E7%94%BB%E9%9D%A2%E3%81%AE%E4%BD%9C%E6%88%909%C2%A5",[1548],"GASから認証付きのCloud Functionsを実行する。 #GoogleCloud - Qiita",[238,1556,1557],{},[1544,1558,1561],{"href":1559,"rel":1560},"https://kkuchima.wordpress.com/2020/12/30/google-apps-script-gas-%E3%81%8B%E3%82%89-cloud-functions-%E3%81%AB%E3%82%A2%E3%82%AF%E3%82%BB%E3%82%B9%E3%81%99%E3%82%8B/9%C2%A5",[1548],"Google Apps Script (GAS) から Cloud Functions に認証付きでアクセスする – kkuchima memo",[238,1563,1564],{},[1544,1565,1568],{"href":1566,"rel":1567},"https://link-and-motivation.hatenablog.com/entry/2024/04/10/1200009%C2%A5",[1548],"Google Apps Script で書かれたアドオンのバックエンドを Cloud Run に移行した話 - Link and Motivation Developers' Blog",[238,1570,1571],{},[1544,1572,1575],{"href":1573,"rel":1574},"https://qiita.com/akira-yp/items/e3cd9d4eefb8f5238edb9%C2%A5",[1548],"GAS + CloudFunctionsでVisionAPIの処理結果をスプレッドシートに出力する #GoogleAppsScript - Qiita",[208,1577,210],{},{"title":20,"searchDepth":35,"depth":35,"links":1579},[1580,1581],{"id":1461,"depth":41,"text":1461},{"id":1473,"depth":35,"text":1473},[1443],"2024-11-01T00:00:00.000Z","Google Apps ScriptからCloud Functionsを呼び出す際のOAuth認証設定を簡易なやり方でまとめたメモ",{},"/posts/gas-cloud-function-auth",{"title":1456,"description":1584},"posts/gas-cloud-function-auth",[1443,1452,1590,1591],"GCP","Cloud Function","0JQdyDLpXE-kxWplSpRJa15yZd75sF2w8imvF-Li9EY",{"id":1594,"title":1595,"body":1596,"categories":1768,"cross_post":215,"date":1769,"description":1770,"extension":218,"image":20,"meta":1771,"navigation":31,"note_id":215,"note_url":215,"path":1772,"private":221,"qiita_id":215,"qiita_url":215,"seo":1773,"stem":1774,"tags":1775,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":1776},"posts/posts/google-drive-csv-get.md","google drive csv 取込結合 スプレッドシート書き込み",{"type":8,"value":1597,"toc":1766},[1598,1764],[15,1599,1601],{"className":17,"code":1600,"language":19,"meta":20,"style":20},"function importData() {\n\n  // 対象フォルダを指定\n  const ss = SpreadsheetApp.getActiveSpreadsheet();\n  const sheet = ss.getSheetByName(\"data\"); //シート名\n  const folder = DriveApp.getFolderById('xxxxx'); //フォルダパスを指定\n\n\n\n  sheet.getRange(2, 1, sheet.getLastRow(), sheet.getLastColumn()).clear()\n\n  const files = folder.getFiles();\n  let sortFiles = []\n  while (files.hasNext()) {\n    sortFiles.push(files.next());\n  }\n  sortFiles.sort(function (a, b) { if (a.getName() > b.getName()) { return 1 } else { return -1 } })\n\n\n  let allSetData = []\n  for (const iterator of sortFiles) {\n    const file = iterator;\n    // 取込処理\n    const data = file.getBlob().getDataAsString(\"UTF-8\");\n    const csv = Utilities.parseCsv(data);\n    const setData = csv\n    setData.shift()\n    setData.reverse()\n    const lastRow = sheet.getLastRow();\n    Logger.log(setData)\n\n    allSetData = [...allSetData, ...setData]\n    // CSV書込\n    if (setData.length > 0) sheet.getRange(lastRow + 1, 1, setData.length, setData[0].length).setValues(setData);\n\n\n",[22,1602,1603,1608,1612,1617,1622,1627,1632,1636,1640,1644,1649,1653,1658,1663,1668,1673,1677,1682,1686,1690,1695,1700,1705,1710,1715,1720,1725,1730,1735,1740,1745,1749,1754,1759],{"__ignoreMap":20},[25,1604,1605],{"class":27,"line":28},[25,1606,1607],{},"function importData() {\n",[25,1609,1610],{"class":27,"line":35},[25,1611,32],{"emptyLinePlaceholder":31},[25,1613,1614],{"class":27,"line":41},[25,1615,1616],{},"  // 対象フォルダを指定\n",[25,1618,1619],{"class":27,"line":46},[25,1620,1621],{},"  const ss = SpreadsheetApp.getActiveSpreadsheet();\n",[25,1623,1624],{"class":27,"line":52},[25,1625,1626],{},"  const sheet = ss.getSheetByName(\"data\"); //シート名\n",[25,1628,1629],{"class":27,"line":58},[25,1630,1631],{},"  const folder = DriveApp.getFolderById('xxxxx'); //フォルダパスを指定\n",[25,1633,1634],{"class":27,"line":63},[25,1635,32],{"emptyLinePlaceholder":31},[25,1637,1638],{"class":27,"line":69},[25,1639,32],{"emptyLinePlaceholder":31},[25,1641,1642],{"class":27,"line":75},[25,1643,32],{"emptyLinePlaceholder":31},[25,1645,1646],{"class":27,"line":80},[25,1647,1648],{},"  sheet.getRange(2, 1, sheet.getLastRow(), sheet.getLastColumn()).clear()\n",[25,1650,1651],{"class":27,"line":86},[25,1652,32],{"emptyLinePlaceholder":31},[25,1654,1655],{"class":27,"line":92},[25,1656,1657],{},"  const files = folder.getFiles();\n",[25,1659,1660],{"class":27,"line":97},[25,1661,1662],{},"  let sortFiles = []\n",[25,1664,1665],{"class":27,"line":103},[25,1666,1667],{},"  while (files.hasNext()) {\n",[25,1669,1670],{"class":27,"line":109},[25,1671,1672],{},"    sortFiles.push(files.next());\n",[25,1674,1675],{"class":27,"line":114},[25,1676,1038],{},[25,1678,1679],{"class":27,"line":120},[25,1680,1681],{},"  sortFiles.sort(function (a, b) { if (a.getName() > b.getName()) { return 1 } else { return -1 } })\n",[25,1683,1684],{"class":27,"line":126},[25,1685,32],{"emptyLinePlaceholder":31},[25,1687,1688],{"class":27,"line":132},[25,1689,32],{"emptyLinePlaceholder":31},[25,1691,1692],{"class":27,"line":138},[25,1693,1694],{},"  let allSetData = []\n",[25,1696,1697],{"class":27,"line":144},[25,1698,1699],{},"  for (const iterator of sortFiles) {\n",[25,1701,1702],{"class":27,"line":150},[25,1703,1704],{},"    const file = iterator;\n",[25,1706,1707],{"class":27,"line":156},[25,1708,1709],{},"    // 取込処理\n",[25,1711,1712],{"class":27,"line":162},[25,1713,1714],{},"    const data = file.getBlob().getDataAsString(\"UTF-8\");\n",[25,1716,1717],{"class":27,"line":168},[25,1718,1719],{},"    const csv = Utilities.parseCsv(data);\n",[25,1721,1722],{"class":27,"line":174},[25,1723,1724],{},"    const setData = csv\n",[25,1726,1727],{"class":27,"line":180},[25,1728,1729],{},"    setData.shift()\n",[25,1731,1732],{"class":27,"line":186},[25,1733,1734],{},"    setData.reverse()\n",[25,1736,1737],{"class":27,"line":191},[25,1738,1739],{},"    const lastRow = sheet.getLastRow();\n",[25,1741,1742],{"class":27,"line":197},[25,1743,1744],{},"    Logger.log(setData)\n",[25,1746,1747],{"class":27,"line":203},[25,1748,32],{"emptyLinePlaceholder":31},[25,1750,1751],{"class":27,"line":1084},[25,1752,1753],{},"    allSetData = [...allSetData, ...setData]\n",[25,1755,1756],{"class":27,"line":1090},[25,1757,1758],{},"    // CSV書込\n",[25,1760,1761],{"class":27,"line":1096},[25,1762,1763],{},"    if (setData.length > 0) sheet.getRange(lastRow + 1, 1, setData.length, setData[0].length).setValues(setData);\n",[208,1765,210],{},{"title":20,"searchDepth":35,"depth":35,"links":1767},[],[1443],"2024-08-08T00:00:00.000Z","Google Apps ScriptでGoogle Driveフォルダ内のCSVファイルをまとめて読み込み、スプレッドシートに書き込むコード",{},"/posts/google-drive-csv-get",{"title":1595,"description":1770},"posts/google-drive-csv-get",[1590,1443],"lKL4QytOBHjSBySDt3shNGbOx7gEOmzMXpzYV96Etes",{"id":1778,"title":1779,"body":1780,"categories":1966,"cross_post":215,"date":1967,"description":1968,"extension":218,"image":20,"meta":1969,"navigation":31,"note_id":215,"note_url":215,"path":1970,"private":221,"qiita_id":215,"qiita_url":215,"seo":1971,"stem":1972,"tags":1973,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":1974},"posts/posts/google-drive-csv-write.md","google drive csv　 オブジェクトからcsv ファイルがない場合保存",{"type":8,"value":1781,"toc":1964},[1782,1962],[15,1783,1785],{"className":17,"code":1784,"language":19,"meta":20,"style":20},"\nconst sample = { id:1 ,name:\"aa\"} // サンプル実際のデータに直して\n\nconst fileName = \"test.csv\"\n\n\n\nconst blob = createBlob(csv, fileName)\n\ndeleteAndWriteDrive(blob, folderId, fileName)\n\nfunction deleteAndWriteDrive(csvBlob, folderId,fileName) {\n  const drive = DriveApp.getFolderById(folderId);\n  const files = drive.getFiles();\n  let sortFiles = []\n  while (files.hasNext()) {\n    sortFiles.push(files.next());\n  }\n  sortFiles.sort(function (a, b) { if (a.getName() > b.getName()) { return 1 } else { return -1 } })\n\n  for (const iterator of sortFiles) {\n    const file = iterator;\n    if (file.getName() === fileName) {\n      hasFileName = file.getName()\n      console.log(`${hasFileName}フォルダが存在します。`)\n      file.setTrashed(true)\n      break\n    }\n  }\n  \n  drive.createFile(csvBlob);\n}\n\nfunction createBlob(csv, fileName) {\n  const contentType = 'text/csv';\n  const charset = 'utf-8';\n  const blob = Utilities.newBlob('', contentType, fileName).setDataFromString(csv, charset);\n  return blob;\n}\n\n",[22,1786,1787,1791,1796,1800,1805,1809,1813,1817,1822,1826,1831,1835,1840,1845,1850,1854,1858,1862,1866,1870,1874,1878,1882,1887,1892,1897,1902,1907,1911,1915,1920,1925,1929,1933,1938,1943,1948,1953,1958],{"__ignoreMap":20},[25,1788,1789],{"class":27,"line":28},[25,1790,32],{"emptyLinePlaceholder":31},[25,1792,1793],{"class":27,"line":35},[25,1794,1795],{},"const sample = { id:1 ,name:\"aa\"} // サンプル実際のデータに直して\n",[25,1797,1798],{"class":27,"line":41},[25,1799,32],{"emptyLinePlaceholder":31},[25,1801,1802],{"class":27,"line":46},[25,1803,1804],{},"const fileName = \"test.csv\"\n",[25,1806,1807],{"class":27,"line":52},[25,1808,32],{"emptyLinePlaceholder":31},[25,1810,1811],{"class":27,"line":58},[25,1812,32],{"emptyLinePlaceholder":31},[25,1814,1815],{"class":27,"line":63},[25,1816,32],{"emptyLinePlaceholder":31},[25,1818,1819],{"class":27,"line":69},[25,1820,1821],{},"const blob = createBlob(csv, fileName)\n",[25,1823,1824],{"class":27,"line":75},[25,1825,32],{"emptyLinePlaceholder":31},[25,1827,1828],{"class":27,"line":80},[25,1829,1830],{},"deleteAndWriteDrive(blob, folderId, fileName)\n",[25,1832,1833],{"class":27,"line":86},[25,1834,32],{"emptyLinePlaceholder":31},[25,1836,1837],{"class":27,"line":92},[25,1838,1839],{},"function deleteAndWriteDrive(csvBlob, folderId,fileName) {\n",[25,1841,1842],{"class":27,"line":97},[25,1843,1844],{},"  const drive = DriveApp.getFolderById(folderId);\n",[25,1846,1847],{"class":27,"line":103},[25,1848,1849],{},"  const files = drive.getFiles();\n",[25,1851,1852],{"class":27,"line":109},[25,1853,1662],{},[25,1855,1856],{"class":27,"line":114},[25,1857,1667],{},[25,1859,1860],{"class":27,"line":120},[25,1861,1672],{},[25,1863,1864],{"class":27,"line":126},[25,1865,1038],{},[25,1867,1868],{"class":27,"line":132},[25,1869,1681],{},[25,1871,1872],{"class":27,"line":138},[25,1873,32],{"emptyLinePlaceholder":31},[25,1875,1876],{"class":27,"line":144},[25,1877,1699],{},[25,1879,1880],{"class":27,"line":150},[25,1881,1704],{},[25,1883,1884],{"class":27,"line":156},[25,1885,1886],{},"    if (file.getName() === fileName) {\n",[25,1888,1889],{"class":27,"line":162},[25,1890,1891],{},"      hasFileName = file.getName()\n",[25,1893,1894],{"class":27,"line":168},[25,1895,1896],{},"      console.log(`${hasFileName}フォルダが存在します。`)\n",[25,1898,1899],{"class":27,"line":174},[25,1900,1901],{},"      file.setTrashed(true)\n",[25,1903,1904],{"class":27,"line":180},[25,1905,1906],{},"      break\n",[25,1908,1909],{"class":27,"line":186},[25,1910,1526],{},[25,1912,1913],{"class":27,"line":191},[25,1914,1038],{},[25,1916,1917],{"class":27,"line":197},[25,1918,1919],{},"  \n",[25,1921,1922],{"class":27,"line":203},[25,1923,1924],{},"  drive.createFile(csvBlob);\n",[25,1926,1927],{"class":27,"line":1084},[25,1928,1186],{},[25,1930,1931],{"class":27,"line":1090},[25,1932,32],{"emptyLinePlaceholder":31},[25,1934,1935],{"class":27,"line":1096},[25,1936,1937],{},"function createBlob(csv, fileName) {\n",[25,1939,1940],{"class":27,"line":1102},[25,1941,1942],{},"  const contentType = 'text/csv';\n",[25,1944,1945],{"class":27,"line":1108},[25,1946,1947],{},"  const charset = 'utf-8';\n",[25,1949,1950],{"class":27,"line":1113},[25,1951,1952],{},"  const blob = Utilities.newBlob('', contentType, fileName).setDataFromString(csv, charset);\n",[25,1954,1955],{"class":27,"line":1119},[25,1956,1957],{},"  return blob;\n",[25,1959,1960],{"class":27,"line":1125},[25,1961,1186],{},[208,1963,210],{},{"title":20,"searchDepth":35,"depth":35,"links":1965},[],[1443],"2024-03-06T00:00:00.000Z","Google Apps Scriptでオブジェクトから生成したCSVを、同名ファイルの重複を避けつつGoogle Driveへ保存するコード",{},"/posts/google-drive-csv-write",{"title":1779,"description":1968},"posts/google-drive-csv-write",[1590,1443],"N_OrY_EGpEkQ2rxYmXkgoEPWMZXuQhLL44XbPXGm3Ng",{"id":1976,"title":1977,"body":1978,"categories":2234,"cross_post":215,"date":2235,"description":2236,"extension":218,"image":20,"meta":2237,"navigation":31,"note_id":215,"note_url":215,"path":2238,"private":221,"qiita_id":215,"qiita_url":215,"seo":2239,"stem":2240,"tags":2241,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":2242},"posts/posts/js-array-count-max.md","javascript 配列 同じ要素数カウント、最大出力",{"type":8,"value":1979,"toc":2231},[1980,2213,2216,2222,2228],[15,1981,1983],{"className":572,"code":1982,"language":574,"meta":20,"style":20},"const array = [1, 1, 1, 2, 2, 3];\n\nconst map = array.reduce(\n  (acc, curr) => acc.set(curr, (acc.get(curr) || 0) + 1),\n  new Map()\n);\n\nconsole.log([...map.keys()]); // [1, 2, 3]\nconsole.log([...map.values()]); // [3, 2, 1]\nconsole.log([...map.entries()]); // [[1, 3], [2, 2], [3, 1]]\n\nconst arrayCountMax = Math.max(...map.values()) //3\n",[22,1984,1985,2026,2030,2048,2097,2107,2112,2116,2140,2160,2180,2184],{"__ignoreMap":20},[25,1986,1987,1989,1992,1994,1997,2000,2003,2005,2007,2009,2011,2014,2016,2018,2020,2023],{"class":27,"line":28},[25,1988,599],{"class":598},[25,1990,1991],{"class":602}," array",[25,1993,606],{"class":598},[25,1995,1996],{"class":581}," [",[25,1998,1999],{"class":602},"1",[25,2001,2002],{"class":581},", ",[25,2004,1999],{"class":602},[25,2006,2002],{"class":581},[25,2008,1999],{"class":602},[25,2010,2002],{"class":581},[25,2012,2013],{"class":602},"2",[25,2015,2002],{"class":581},[25,2017,2013],{"class":602},[25,2019,2002],{"class":581},[25,2021,2022],{"class":602},"3",[25,2024,2025],{"class":581},"];\n",[25,2027,2028],{"class":27,"line":35},[25,2029,32],{"emptyLinePlaceholder":31},[25,2031,2032,2034,2037,2039,2042,2045],{"class":27,"line":41},[25,2033,599],{"class":598},[25,2035,2036],{"class":602}," map",[25,2038,606],{"class":598},[25,2040,2041],{"class":581}," array.",[25,2043,2044],{"class":585},"reduce",[25,2046,2047],{"class":581},"(\n",[25,2049,2050,2053,2056,2058,2061,2063,2065,2068,2071,2074,2077,2080,2083,2086,2088,2091,2094],{"class":27,"line":46},[25,2051,2052],{"class":581},"  (",[25,2054,2055],{"class":695},"acc",[25,2057,2002],{"class":581},[25,2059,2060],{"class":695},"curr",[25,2062,699],{"class":581},[25,2064,702],{"class":598},[25,2066,2067],{"class":581}," acc.",[25,2069,2070],{"class":585},"set",[25,2072,2073],{"class":581},"(curr, (acc.",[25,2075,2076],{"class":585},"get",[25,2078,2079],{"class":581},"(curr) ",[25,2081,2082],{"class":598},"||",[25,2084,2085],{"class":602}," 0",[25,2087,699],{"class":581},[25,2089,2090],{"class":598},"+",[25,2092,2093],{"class":602}," 1",[25,2095,2096],{"class":581},"),\n",[25,2098,2099,2102,2105],{"class":27,"line":52},[25,2100,2101],{"class":598},"  new",[25,2103,2104],{"class":585}," Map",[25,2106,615],{"class":581},[25,2108,2109],{"class":27,"line":58},[25,2110,2111],{"class":581},");\n",[25,2113,2114],{"class":27,"line":63},[25,2115,32],{"emptyLinePlaceholder":31},[25,2117,2118,2120,2122,2125,2128,2131,2134,2137],{"class":27,"line":69},[25,2119,662],{"class":581},[25,2121,665],{"class":585},[25,2123,2124],{"class":581},"([",[25,2126,2127],{"class":598},"...",[25,2129,2130],{"class":581},"map.",[25,2132,2133],{"class":585},"keys",[25,2135,2136],{"class":581},"()]); ",[25,2138,2139],{"class":656},"// [1, 2, 3]\n",[25,2141,2142,2144,2146,2148,2150,2152,2155,2157],{"class":27,"line":75},[25,2143,662],{"class":581},[25,2145,665],{"class":585},[25,2147,2124],{"class":581},[25,2149,2127],{"class":598},[25,2151,2130],{"class":581},[25,2153,2154],{"class":585},"values",[25,2156,2136],{"class":581},[25,2158,2159],{"class":656},"// [3, 2, 1]\n",[25,2161,2162,2164,2166,2168,2170,2172,2175,2177],{"class":27,"line":80},[25,2163,662],{"class":581},[25,2165,665],{"class":585},[25,2167,2124],{"class":581},[25,2169,2127],{"class":598},[25,2171,2130],{"class":581},[25,2173,2174],{"class":585},"entries",[25,2176,2136],{"class":581},[25,2178,2179],{"class":656},"// [[1, 3], [2, 2], [3, 1]]\n",[25,2181,2182],{"class":27,"line":86},[25,2183,32],{"emptyLinePlaceholder":31},[25,2185,2186,2188,2191,2193,2196,2199,2201,2203,2205,2207,2210],{"class":27,"line":92},[25,2187,599],{"class":598},[25,2189,2190],{"class":602}," arrayCountMax",[25,2192,606],{"class":598},[25,2194,2195],{"class":581}," Math.",[25,2197,2198],{"class":585},"max",[25,2200,640],{"class":581},[25,2202,2127],{"class":598},[25,2204,2130],{"class":581},[25,2206,2154],{"class":585},[25,2208,2209],{"class":581},"()) ",[25,2211,2212],{"class":656},"//3\n",[1204,2214,2215],{"id":2215},"参考",[238,2217,2218],{},[1544,2219,2220],{"href":2220,"rel":2221},"https://qiita.com/saka212/items/408bb17dddefc09004c8",[1548],[238,2223,2224],{},[1544,2225,2226],{"href":2226,"rel":2227},"https://pote-chil.com/blog/count-duplicate-array-item",[1548],[208,2229,2230],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":20,"searchDepth":35,"depth":35,"links":2232},[2233],{"id":2215,"depth":41,"text":2215},[1443],"2023-11-28T00:00:00.000Z","JavaScriptで配列内の要素ごとの出現回数を数え、最も多く出現する回数を求めるコードのメモ",{},"/posts/js-array-count-max",{"title":1977,"description":2236},"posts/js-array-count-max",[1443,1451],"KvvHi7no7XgJ7mn4i4f3uPOK2IQfLzQU5WZcw6WQ_JM",{"id":2244,"title":2245,"body":2246,"categories":4459,"cross_post":215,"date":4460,"description":4461,"extension":218,"image":20,"meta":4462,"navigation":31,"note_id":215,"note_url":215,"path":4463,"private":221,"qiita_id":215,"qiita_url":215,"seo":4464,"stem":4465,"tags":4466,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":4469},"posts/posts/notion-to-google-calender-1103.md","NotionタスクとGoogleカレンダーの同期システムを作る",{"type":8,"value":2247,"toc":4432},[2248,2250,2253,2256,2259,2262,2276,2279,2293,2296,2300,2303,2343,2347,2350,2429,2432,2516,2520,2523,2590,2594,2597,2655,2659,2760,2763,2767,2778,2782,2793,2797,2864,2867,2870,2873,2887,2890,2953,4352,4355,4396,4398,4401,4404,4407,4430],[11,2249,890],{"id":890},[238,2251,2252],{},"NotionのタスクをGoogleカレンダーと自動で同期させるシステムの実装方法を紹介します。このシステムにより、Notionで管理しているタスクの期限日を自動的にGoogleカレンダーに反映させることができます。ただしGoogleカレンダーの変更をNotionに反映することは想定していません。",[238,2254,2255],{},"また、完了したタスクはGoogleカレンダータスクを同期しているカレンダーとは別のカレンダに移動させるようにしています。",[11,2257,2258],{"id":2258},"システムの概要",[1204,2260,2261],{"id":2261},"主な機能",[304,2263,2264,2267,2270,2273],{},[307,2265,2266],{},"Notionの新規タスクを自動的にGoogleカレンダーに追加",[307,2268,2269],{},"タスクの更新（タイトル、期限）をカレンダーに反映",[307,2271,2272],{},"完了したタスクのカレンダーイベントを自動削除",[307,2274,2275],{},"定期的に同期",[1204,2277,2278],{"id":2278},"必要な準備",[1402,2280,2281,2284,2287,2290],{},[307,2282,2283],{},"Notion API キー",[307,2285,2286],{},"Notionデータベースの設定",[307,2288,2289],{},"Googleカレンダー",[307,2291,2292],{},"Google Apps Script環境",[11,2294,2295],{"id":2295},"実装方法",[1204,2297,2299],{"id":2298},"_1-設定","1. 設定",[238,2301,2302],{},"必要な認証情報とIDを設定します：",[15,2304,2306],{"className":17,"code":2305,"language":19,"meta":20,"style":20},"const CONFIG = {\n  NOTION_API_KEY: 'your-notion-api-key',\n  NOTION_DATABASE_ID: 'your-database-id',\n  CALENDAR_ID: 'your-calendar-id@group.calendar.google.com',\n  DONE_CALENDAR_ID: 'your-calendar-id@group.calendar.google.com',\n  NOTION_VERSION: '2022-06-28'\n};\n",[22,2307,2308,2313,2318,2323,2328,2333,2338],{"__ignoreMap":20},[25,2309,2310],{"class":27,"line":28},[25,2311,2312],{},"const CONFIG = {\n",[25,2314,2315],{"class":27,"line":35},[25,2316,2317],{},"  NOTION_API_KEY: 'your-notion-api-key',\n",[25,2319,2320],{"class":27,"line":41},[25,2321,2322],{},"  NOTION_DATABASE_ID: 'your-database-id',\n",[25,2324,2325],{"class":27,"line":46},[25,2326,2327],{},"  CALENDAR_ID: 'your-calendar-id@group.calendar.google.com',\n",[25,2329,2330],{"class":27,"line":52},[25,2331,2332],{},"  DONE_CALENDAR_ID: 'your-calendar-id@group.calendar.google.com',\n",[25,2334,2335],{"class":27,"line":58},[25,2336,2337],{},"  NOTION_VERSION: '2022-06-28'\n",[25,2339,2340],{"class":27,"line":63},[25,2341,2342],{},"};\n",[1204,2344,2346],{"id":2345},"_2-notionとの連携","2. Notionとの連携",[1204,2348,2349],{"id":2349},"タスク取得",[15,2351,2353],{"className":17,"code":2352,"language":19,"meta":20,"style":20},"// Notionからタスク一覧を取得\nfunction getNotionTasks() {\n  const url = `https://api.notion.com/v1/databases/${CONFIG.NOTION_DATABASE_ID}/query`;\n  const response = UrlFetchApp.fetch(url, {\n    method: 'POST',\n    headers: NOTION_HEADERS,\n    payload: JSON.stringify({\n      sorts: [\n        {\n          property: 'DueDate', // 日付プロパティ名\n          direction: 'descending' // 昇順にソート（降順の場合は'descending'に変更）\n        }\n      ],\n    })\n  });\n\n",[22,2354,2355,2360,2365,2370,2375,2380,2385,2390,2395,2400,2405,2410,2415,2420,2425],{"__ignoreMap":20},[25,2356,2357],{"class":27,"line":28},[25,2358,2359],{},"// Notionからタスク一覧を取得\n",[25,2361,2362],{"class":27,"line":35},[25,2363,2364],{},"function getNotionTasks() {\n",[25,2366,2367],{"class":27,"line":41},[25,2368,2369],{},"  const url = `https://api.notion.com/v1/databases/${CONFIG.NOTION_DATABASE_ID}/query`;\n",[25,2371,2372],{"class":27,"line":46},[25,2373,2374],{},"  const response = UrlFetchApp.fetch(url, {\n",[25,2376,2377],{"class":27,"line":52},[25,2378,2379],{},"    method: 'POST',\n",[25,2381,2382],{"class":27,"line":58},[25,2383,2384],{},"    headers: NOTION_HEADERS,\n",[25,2386,2387],{"class":27,"line":63},[25,2388,2389],{},"    payload: JSON.stringify({\n",[25,2391,2392],{"class":27,"line":69},[25,2393,2394],{},"      sorts: [\n",[25,2396,2397],{"class":27,"line":75},[25,2398,2399],{},"        {\n",[25,2401,2402],{"class":27,"line":80},[25,2403,2404],{},"          property: 'DueDate', // 日付プロパティ名\n",[25,2406,2407],{"class":27,"line":86},[25,2408,2409],{},"          direction: 'descending' // 昇順にソート（降順の場合は'descending'に変更）\n",[25,2411,2412],{"class":27,"line":92},[25,2413,2414],{},"        }\n",[25,2416,2417],{"class":27,"line":97},[25,2418,2419],{},"      ],\n",[25,2421,2422],{"class":27,"line":103},[25,2423,2424],{},"    })\n",[25,2426,2427],{"class":27,"line":109},[25,2428,1169],{},[1204,2430,2431],{"id":2431},"タスク更新",[15,2433,2435],{"className":17,"code":2434,"language":19,"meta":20,"style":20},"// Notionのタスクを更新（カレンダーイベントIDの保存）\nfunction updateNotionTask(taskId, calendarEventId) {\n  const url = `https://api.notion.com/v1/pages/${taskId}`;\n  return UrlFetchApp.fetch(url, {\n    method: 'PATCH',\n    headers: NOTION_HEADERS,\n    payload: JSON.stringify({\n      properties: {\n        'Calendar Event ID': {\n          rich_text: [{\n            text: { content: calendarEventId }\n          }]\n        }\n      }\n    })\n  });\n}\n\n",[22,2436,2437,2442,2447,2452,2457,2462,2466,2470,2475,2480,2485,2490,2495,2499,2504,2508,2512],{"__ignoreMap":20},[25,2438,2439],{"class":27,"line":28},[25,2440,2441],{},"// Notionのタスクを更新（カレンダーイベントIDの保存）\n",[25,2443,2444],{"class":27,"line":35},[25,2445,2446],{},"function updateNotionTask(taskId, calendarEventId) {\n",[25,2448,2449],{"class":27,"line":41},[25,2450,2451],{},"  const url = `https://api.notion.com/v1/pages/${taskId}`;\n",[25,2453,2454],{"class":27,"line":46},[25,2455,2456],{},"  return UrlFetchApp.fetch(url, {\n",[25,2458,2459],{"class":27,"line":52},[25,2460,2461],{},"    method: 'PATCH',\n",[25,2463,2464],{"class":27,"line":58},[25,2465,2384],{},[25,2467,2468],{"class":27,"line":63},[25,2469,2389],{},[25,2471,2472],{"class":27,"line":69},[25,2473,2474],{},"      properties: {\n",[25,2476,2477],{"class":27,"line":75},[25,2478,2479],{},"        'Calendar Event ID': {\n",[25,2481,2482],{"class":27,"line":80},[25,2483,2484],{},"          rich_text: [{\n",[25,2486,2487],{"class":27,"line":86},[25,2488,2489],{},"            text: { content: calendarEventId }\n",[25,2491,2492],{"class":27,"line":92},[25,2493,2494],{},"          }]\n",[25,2496,2497],{"class":27,"line":97},[25,2498,2414],{},[25,2500,2501],{"class":27,"line":103},[25,2502,2503],{},"      }\n",[25,2505,2506],{"class":27,"line":109},[25,2507,2424],{},[25,2509,2510],{"class":27,"line":114},[25,2511,1169],{},[25,2513,2514],{"class":27,"line":120},[25,2515,1186],{},[1204,2517,2519],{"id":2518},"_3-googleカレンダーとの連携","3. Googleカレンダーとの連携",[1204,2521,2522],{"id":2522},"イベント作成",[15,2524,2526],{"className":17,"code":2525,"language":19,"meta":20,"style":20},"function createCalendarEvent(task) {\n  const calendar = CalendarApp.getCalendarById(CONFIG.CALENDAR_ID);\n  const title = task.properties.Name.title[0].plain_text;\n  const dueDate = new Date(task.properties.DueDate.date.start);\n\n  const event = calendar.createAllDayEvent(\n    title,\n    dueDate,\n    { description: `Notion Task ID: ${task.id}\\\\nURL: ${task.url}` }\n  );\n\n  return event.getId();\n}\n\n",[22,2527,2528,2533,2538,2543,2548,2552,2557,2562,2567,2572,2577,2581,2586],{"__ignoreMap":20},[25,2529,2530],{"class":27,"line":28},[25,2531,2532],{},"function createCalendarEvent(task) {\n",[25,2534,2535],{"class":27,"line":35},[25,2536,2537],{},"  const calendar = CalendarApp.getCalendarById(CONFIG.CALENDAR_ID);\n",[25,2539,2540],{"class":27,"line":41},[25,2541,2542],{},"  const title = task.properties.Name.title[0].plain_text;\n",[25,2544,2545],{"class":27,"line":46},[25,2546,2547],{},"  const dueDate = new Date(task.properties.DueDate.date.start);\n",[25,2549,2550],{"class":27,"line":52},[25,2551,32],{"emptyLinePlaceholder":31},[25,2553,2554],{"class":27,"line":58},[25,2555,2556],{},"  const event = calendar.createAllDayEvent(\n",[25,2558,2559],{"class":27,"line":63},[25,2560,2561],{},"    title,\n",[25,2563,2564],{"class":27,"line":69},[25,2565,2566],{},"    dueDate,\n",[25,2568,2569],{"class":27,"line":75},[25,2570,2571],{},"    { description: `Notion Task ID: ${task.id}\\\\nURL: ${task.url}` }\n",[25,2573,2574],{"class":27,"line":80},[25,2575,2576],{},"  );\n",[25,2578,2579],{"class":27,"line":86},[25,2580,32],{"emptyLinePlaceholder":31},[25,2582,2583],{"class":27,"line":92},[25,2584,2585],{},"  return event.getId();\n",[25,2587,2588],{"class":27,"line":97},[25,2589,1186],{},[1204,2591,2593],{"id":2592},"_4-状態管理","4. 状態管理",[238,2595,2596],{},"タスクの状態を管理するための機能：",[15,2598,2600],{"className":17,"code":2599,"language":19,"meta":20,"style":20},"\n// タスクの現在の状態を取得\nfunction getTaskState(task) {\n  return {\n    id: task.id,\n    title: task.properties.Name.title[0].plain_text,\n    dueDate: task.properties.DueDate.date?.start,\n    status: task.properties.Status.status ? task.properties.Status.status.name : \"None\",\n    calendarEventId: task.properties['Calendar Event ID']?.rich_text[0]?.text.content\n  };\n}\n\n",[22,2601,2602,2606,2611,2616,2621,2626,2631,2636,2641,2646,2651],{"__ignoreMap":20},[25,2603,2604],{"class":27,"line":28},[25,2605,32],{"emptyLinePlaceholder":31},[25,2607,2608],{"class":27,"line":35},[25,2609,2610],{},"// タスクの現在の状態を取得\n",[25,2612,2613],{"class":27,"line":41},[25,2614,2615],{},"function getTaskState(task) {\n",[25,2617,2618],{"class":27,"line":46},[25,2619,2620],{},"  return {\n",[25,2622,2623],{"class":27,"line":52},[25,2624,2625],{},"    id: task.id,\n",[25,2627,2628],{"class":27,"line":58},[25,2629,2630],{},"    title: task.properties.Name.title[0].plain_text,\n",[25,2632,2633],{"class":27,"line":63},[25,2634,2635],{},"    dueDate: task.properties.DueDate.date?.start,\n",[25,2637,2638],{"class":27,"line":69},[25,2639,2640],{},"    status: task.properties.Status.status ? task.properties.Status.status.name : \"None\",\n",[25,2642,2643],{"class":27,"line":75},[25,2644,2645],{},"    calendarEventId: task.properties['Calendar Event ID']?.rich_text[0]?.text.content\n",[25,2647,2648],{"class":27,"line":80},[25,2649,2650],{},"  };\n",[25,2652,2653],{"class":27,"line":86},[25,2654,1186],{},[1204,2656,2658],{"id":2657},"_5-メイン同期処理","5. メイン同期処理",[15,2660,2662],{"className":17,"code":2661,"language":19,"meta":20,"style":20},"function syncNotionWithCalendar() {\n  try {\n    const tasks = getNotionTasks();\n    const previousState = getPreviousState();\n    const currentState = {};\n\n    tasks.forEach(task => {\n      currentState[task.id] = getTaskState(task);\n    });\n\n    tasks.forEach(task => {\n      processTaskChanges(task, previousState, currentState);\n    });\n\n    processDeletedTasks(previousState, currentState);\n    savePreviousState(currentState);\n\n  } catch (error) {\n    logError(error, 'メイン同期処理');\n  }\n}\n\n",[22,2663,2664,2669,2674,2679,2684,2689,2693,2698,2703,2707,2711,2715,2720,2724,2728,2733,2738,2742,2747,2752,2756],{"__ignoreMap":20},[25,2665,2666],{"class":27,"line":28},[25,2667,2668],{},"function syncNotionWithCalendar() {\n",[25,2670,2671],{"class":27,"line":35},[25,2672,2673],{},"  try {\n",[25,2675,2676],{"class":27,"line":41},[25,2677,2678],{},"    const tasks = getNotionTasks();\n",[25,2680,2681],{"class":27,"line":46},[25,2682,2683],{},"    const previousState = getPreviousState();\n",[25,2685,2686],{"class":27,"line":52},[25,2687,2688],{},"    const currentState = {};\n",[25,2690,2691],{"class":27,"line":58},[25,2692,32],{"emptyLinePlaceholder":31},[25,2694,2695],{"class":27,"line":63},[25,2696,2697],{},"    tasks.forEach(task => {\n",[25,2699,2700],{"class":27,"line":69},[25,2701,2702],{},"      currentState[task.id] = getTaskState(task);\n",[25,2704,2705],{"class":27,"line":75},[25,2706,1163],{},[25,2708,2709],{"class":27,"line":80},[25,2710,32],{"emptyLinePlaceholder":31},[25,2712,2713],{"class":27,"line":86},[25,2714,2697],{},[25,2716,2717],{"class":27,"line":92},[25,2718,2719],{},"      processTaskChanges(task, previousState, currentState);\n",[25,2721,2722],{"class":27,"line":97},[25,2723,1163],{},[25,2725,2726],{"class":27,"line":103},[25,2727,32],{"emptyLinePlaceholder":31},[25,2729,2730],{"class":27,"line":109},[25,2731,2732],{},"    processDeletedTasks(previousState, currentState);\n",[25,2734,2735],{"class":27,"line":114},[25,2736,2737],{},"    savePreviousState(currentState);\n",[25,2739,2740],{"class":27,"line":120},[25,2741,32],{"emptyLinePlaceholder":31},[25,2743,2744],{"class":27,"line":126},[25,2745,2746],{},"  } catch (error) {\n",[25,2748,2749],{"class":27,"line":132},[25,2750,2751],{},"    logError(error, 'メイン同期処理');\n",[25,2753,2754],{"class":27,"line":138},[25,2755,1038],{},[25,2757,2758],{"class":27,"line":144},[25,2759,1186],{},[11,2761,2762],{"id":2762},"実装のポイント",[1204,2764,2766],{"id":2765},"_1-エラーハンドリング","1. エラーハンドリング",[304,2768,2769,2772,2775],{},[307,2770,2771],{},"各処理でtry-catchを使用",[307,2773,2774],{},"エラーログの記録",[307,2776,2777],{},"コンテキスト情報の保持",[1204,2779,2781],{"id":2780},"_2-キャッシュの活用","2. キャッシュの活用",[304,2783,2784,2787,2790],{},[307,2785,2786],{},"前回の状態をキャッシュに保存",[307,2788,2789],{},"6時間のキャッシュ有効期限",[307,2791,2792],{},"差分検出による効率的な更新",[1204,2794,2796],{"id":2795},"_3-定期実行の設定","3. 定期実行の設定",[15,2798,2800],{"className":17,"code":2799,"language":19,"meta":20,"style":20},"// 定期実行トリガーの設定\nfunction setUpTrigger() {\n  // 既存のトリガーを削除\n  ScriptApp.getProjectTriggers().forEach(trigger => {\n    ScriptApp.deleteTrigger(trigger);\n  });\n\n  // 新しいトリガーを作成（1時間ごとに実行）\n  ScriptApp.newTrigger('syncNotionWithCalendar')\n    .timeBased()\n    .everyHours(1)\n    .create();\n}\n\n",[22,2801,2802,2807,2812,2817,2822,2827,2831,2835,2840,2845,2850,2855,2860],{"__ignoreMap":20},[25,2803,2804],{"class":27,"line":28},[25,2805,2806],{},"// 定期実行トリガーの設定\n",[25,2808,2809],{"class":27,"line":35},[25,2810,2811],{},"function setUpTrigger() {\n",[25,2813,2814],{"class":27,"line":41},[25,2815,2816],{},"  // 既存のトリガーを削除\n",[25,2818,2819],{"class":27,"line":46},[25,2820,2821],{},"  ScriptApp.getProjectTriggers().forEach(trigger => {\n",[25,2823,2824],{"class":27,"line":52},[25,2825,2826],{},"    ScriptApp.deleteTrigger(trigger);\n",[25,2828,2829],{"class":27,"line":58},[25,2830,1169],{},[25,2832,2833],{"class":27,"line":63},[25,2834,32],{"emptyLinePlaceholder":31},[25,2836,2837],{"class":27,"line":69},[25,2838,2839],{},"  // 新しいトリガーを作成（1時間ごとに実行）\n",[25,2841,2842],{"class":27,"line":75},[25,2843,2844],{},"  ScriptApp.newTrigger('syncNotionWithCalendar')\n",[25,2846,2847],{"class":27,"line":80},[25,2848,2849],{},"    .timeBased()\n",[25,2851,2852],{"class":27,"line":86},[25,2853,2854],{},"    .everyHours(1)\n",[25,2856,2857],{"class":27,"line":92},[25,2858,2859],{},"    .create();\n",[25,2861,2862],{"class":27,"line":97},[25,2863,1186],{},[11,2865,2286],{"id":2866},"notionデータベースの設定",[238,2868,2869],{},"きちんとtextかstatusか日付か合わせる",[238,2871,2872],{},"必要な項目：",[1402,2874,2875,2878,2881,2884],{},[307,2876,2877],{},"Name（タイトル）",[307,2879,2880],{},"DueDate（期限日）",[307,2882,2883],{},"Status（ステータス）",[307,2885,2886],{},"Calendar Event ID（カレンダー連携用）",[11,2888,2889],{"id":2889},"セットアップ手順",[1402,2891,2892,2895,2909,2917,2932,2935,2943],{},[307,2893,2894],{},"Google Apps Scriptプロジェクトの作成",[307,2896,2897,2898],{},"Notion APIキーの取得\n",[1402,2899,2900],{},[307,2901,2902,2903,2908],{},"Notion APIキーは ",[1544,2904,2907],{"href":2905,"rel":2906},"https://www.notion.so/my-integrations",[1548],"Notion Developer"," から取得できます。",[307,2910,2911,2912],{},"Notionデータベースの準備\n",[1402,2913,2914],{},[307,2915,2916],{},"同期したいデータベースのURLから、IDを取得します。",[307,2918,2919,2922,2923],{},[904,2920,2921],{},"GoogleカレンダーID","を確認する。\n",[304,2924,2925],{},[307,2926,2927,2928,2931],{},"メインカレンダーの場合は",[22,2929,2930],{},"primary","、他のカレンダーの場合はカレンダー設定画面でIDを確認してください。",[307,2933,2934],{},"コードの貼り付けと設定",[307,2936,2937,2938],{},"トリガーの設定\n",[1402,2939,2940],{},[307,2941,2942],{},"setUpTriggerの実行 自分の頻度に合わせて",[307,2944,2945,2948],{},[904,2946,2947],{},"権限の設定",[304,2949,2950],{},[307,2951,2952],{},"初回実行時にGoogleカレンダーへのアクセス権限を求められますので、許可します。",[15,2954,2956],{"className":17,"code":2955,"language":19,"meta":20,"style":20},"// API キーやIDを管理する設定オブジェクト\nconst CONFIG = {\n  NOTION_API_KEY: 'your-notion-api-key',\n  NOTION_DATABASE_ID: 'your-database-id',\n  CALENDAR_ID: 'your-calendar-id@group.calendar.google.com',\n  DONE_CALENDAR_ID: 'your-calendar-id@group.calendar.google.com',\n  NOTION_VERSION: '2022-06-28'\n};\n\n// Notionの共通ヘッダー設定\nconst NOTION_HEADERS = {\n  'Authorization': `Bearer ${CONFIG.NOTION_API_KEY}`,\n  'Notion-Version': CONFIG.NOTION_VERSION,\n  'Content-Type': 'application/json'\n};\n\n\n\n\n\n// メイン同期処理\nfunction syncNotionWithCalendar() {\n  try {\n    // タスク一覧の取得\n    const tasks = getNotionTasks();\n    const previousState = getPreviousState();\n    const currentState = {};\n\n    // 現在の状態を構築\n    console.log(\"現在の状態を構築\")\n    tasks.forEach(task => {\n\n      currentState[task.id] = getTaskState(task);\n    });\n\n    console.log(\"タスクの変更を処理\")\n    // タスクの変更を処理\n    tasks.forEach(task => {\n      console.log(\"currentState\", currentState[task.id])\n      console.log(\"previousState\", previousState[task.id])\n      processTaskChanges(task, previousState, currentState);\n    });\n\n    // 削除されたタスクを処理\n    console.log(\"削除されたタスクを処理\")\n    processDeletedTasks(previousState, currentState);\n\n    // 現在の状態を保存\n    console.log(\"現在の状態を保存\")\n    savePreviousState(currentState);\n\n  } catch (error) {\n    logError(error, 'メイン同期処理');\n  }\n}\n\n\n\n\n// Notionからタスク一覧を取得\nfunction getNotionTasks() {\n  const url = `https://api.notion.com/v1/databases/${CONFIG.NOTION_DATABASE_ID}/query`;\n  const response = UrlFetchApp.fetch(url, {\n    method: 'POST',\n    headers: NOTION_HEADERS,\n    payload: JSON.stringify({\n      sorts: [\n        {\n          property: 'DueDate', // 日付プロパティ名\n          direction: 'descending' // 昇順にソート（降順の場合は'descending'に変更）\n        }\n      ],\n    })\n  });\n\n  console.log(\"next_cursor\", JSON.parse(response.getContentText()).next_cursor)\n  return JSON.parse(response.getContentText()).results;\n}\n\n// Notionのタスクを更新（カレンダーイベントIDの保存）\nfunction updateNotionTask(taskId, calendarEventId) {\n  const url = `https://api.notion.com/v1/pages/${taskId}`;\n  return UrlFetchApp.fetch(url, {\n    method: 'PATCH',\n    headers: NOTION_HEADERS,\n    payload: JSON.stringify({\n      properties: {\n        'Calendar Event ID': {\n          rich_text: [{\n            text: { content: calendarEventId }\n          }]\n        }\n      }\n    })\n  });\n}\n\n// カレンダーイベントの新規作成\nfunction createCalendarEvent(task, CALENDAR_ID) {\n  const calendar = CalendarApp.getCalendarById(CALENDAR_ID);\n  const title = task.properties.Name.title[0].plain_text;\n  const dueDate = new Date(task.properties.DueDate.date.start);\n\n  if (!dueDate) return\n\n  const event = calendar.createAllDayEvent(\n    title,\n    dueDate,\n    { description: `Notion Task ID: ${task.id}\\nURL: ${task.url}` }\n  );\n\n  console.log(event)\n  return event.getId();\n}\n\n// カレンダーイベントの更新\nfunction updateCalendarEvent(eventId, task) {\n  const calendar = CalendarApp.getCalendarById(CONFIG.CALENDAR_ID);\n  const event = calendar.getEventById(eventId);\n  if (!event) return;\n\n  const title = task.properties.Name.title[0].plain_text;\n  const dueDate = new Date(task.properties.DueDate.date.start);\n\n  event.setTitle(title);\n  event.setAllDayDate(dueDate);\n  event.setDescription(`Notion Task ID: ${task.id}\\nURL: ${task.url}`);\n}\n\n// カレンダーイベントの削除\nfunction deleteCalendarEvent(eventId) {\n  const calendar = CalendarApp.getCalendarById(CONFIG.CALENDAR_ID);\n\n  try {\n    const event = calendar.getEventById(eventId);\n    if (event) {\n      event.deleteEvent();\n      return true\n    }\n  } catch (e) {\n    console.error(\"削除されている\", e)\n    return false\n\n  }\n\n  return false\n}\n\n// タスクの現在の状態を取得\nfunction getTaskState(task) {\n  return {\n    id: task.id,\n    title: task.properties.Name.title[0].plain_text,\n    dueDate: task.properties.DueDate.date?.start,\n    status: task.properties.Status.status ? task.properties.Status.status.name : \"None\",\n    calendarEventId: task.properties['Calendar Event ID']?.rich_text[0]?.text.content\n  };\n}\n\n// キャッシュから前回の状態を取得\nfunction getPreviousState() {\n  const cache = CacheService.getScriptCache();\n  const data = cache.get('previousState');\n\n  console.log(JSON.parse(data))\n  return data ? JSON.parse(data) : {};\n}\n\n// 現在の状態をキャッシュに保存（6時間有効）\nfunction savePreviousState(state) {\n  const cache = CacheService.getScriptCache();\n  cache.put('previousState', JSON.stringify(state), 21600);\n}\n\n// タスクの変更を検出して必要な処理を実行\nfunction processTaskChanges(task, previousState, currentState) {\n  const taskId = task.id;\n  const prevTask = previousState[taskId];\n  const currentTask = currentState[taskId];\n\n  try {\n    if (!prevTask && task.properties.DueDate?.date?.start) {\n      // 新規タスクの処理\n      console.log(\"新規タスクの処理\")\n      const calendarEventId = createCalendarEvent(task, CONFIG.CALENDAR_ID);\n      updateNotionTask(taskId, calendarEventId);\n    } else if (prevTask && prevTask.dueDate) {\n      // 既存タスクの処理\n      console.log(\"既存タスクの処理\")\n      const calendarEventId = prevTask.calendarEventId;\n      if (currentTask.status === 'Deleted') {\n        // 削除されたタスクの処理\n        console.log(\"削除されたタスクの処理\")\n        deleteCalendarEvent(calendarEventId);\n\n      } else if (\n        prevTask.title !== currentTask.title ||\n        prevTask.dueDate !== currentTask.dueDate\n      ) {\n        // タスクが更新された場合の処理\n        console.log(\"タスクが更新された場合の処理\")\n        updateCalendarEvent(calendarEventId, task);\n      } else if (currentTask.status === 'Done') {\n        // ステータスが完了タスクの処理\n        console.log(\"ステータスが完了タスクの処理\")\n        const reslut = deleteCalendarEvent(calendarEventId);\n        console.log(\"ステータスが完了タスクの処理終了 google カレンダー削除 \",reslut)\n\n        // 削除がない場合終了\n        if (!reslut) return\n\n        console.log(\"別カレンダーに完了を作成\")\n        // 別カレンダーに完了を作成\n        createCalendarEvent(task, CONFIG.DONE_CALENDAR_ID);\n        updateNotionTask(taskId, \"done\");\n        console.log(\"別カレンダーに完了を作成終了\")\n      }\n    }\n  } catch (error) {\n    logError(error, `タスク処理エラー - TaskID: ${taskId}`);\n  }\n}\n\n// 削除されたタスクの処理\nfunction processDeletedTasks(previousState, currentState) {\n  Object.keys(previousState).forEach(taskId => {\n    if (!currentState[taskId]) {\n      const calendarEventId = previousState[taskId].calendarEventId;\n      if (calendarEventId) {\n        try {\n          deleteCalendarEvent(calendarEventId);\n        } catch (error) {\n          logError(error, `削除済みタスクの処理エラー - TaskID: ${taskId}`);\n        }\n      }\n    }\n  });\n}\n\n// エラーログの記録\nfunction logError(error, context = '') {\n  console.error(`同期エラー ${context}:`, error);\n  // 必要に応じて追加のエラーハンドリング（Slack通知やメール送信など）\n\n\n}\n\n// 特定のキャッシュキーを削除する関数\nfunction clearPreviousStateCache() {\n  const cache = CacheService.getScriptCache();\n  cache.remove('previousState');\n  console.log(\"キャッシュ 'previousState' を削除しました\");\n}\n\n// 定期実行トリガーの設定\nfunction setUpTrigger() {\n  // 既存のトリガーを削除\n  ScriptApp.getProjectTriggers().forEach(trigger => {\n    ScriptApp.deleteTrigger(trigger);\n  });\n\n  // 新しいトリガーを作成（1時間ごとに実行）\n  ScriptApp.newTrigger('syncNotionWithCalendar')\n    .timeBased()\n    .everyHours(1)\n    .create();\n}\n",[22,2957,2958,2963,2967,2971,2975,2979,2983,2987,2991,2995,3000,3005,3010,3015,3020,3024,3028,3032,3036,3040,3044,3049,3053,3057,3062,3066,3070,3074,3078,3083,3088,3092,3096,3100,3104,3108,3113,3118,3122,3127,3132,3136,3140,3144,3149,3154,3158,3162,3167,3172,3177,3182,3187,3192,3197,3202,3207,3212,3217,3222,3227,3232,3237,3242,3247,3252,3257,3262,3267,3272,3277,3282,3287,3292,3297,3302,3308,3314,3319,3324,3329,3334,3339,3344,3349,3354,3359,3364,3369,3374,3379,3384,3389,3394,3399,3404,3409,3414,3420,3426,3432,3437,3442,3447,3453,3458,3463,3468,3473,3479,3484,3489,3495,3500,3505,3510,3516,3522,3527,3533,3539,3544,3549,3554,3559,3565,3571,3577,3582,3587,3593,3599,3604,3609,3614,3620,3626,3632,3638,3643,3649,3655,3661,3666,3671,3676,3682,3687,3692,3697,3702,3707,3712,3717,3722,3727,3732,3737,3742,3747,3753,3759,3765,3771,3776,3782,3788,3793,3798,3804,3810,3815,3821,3826,3831,3837,3843,3849,3855,3861,3866,3871,3877,3883,3889,3895,3901,3907,3913,3919,3925,3931,3937,3943,3949,3954,3960,3966,3972,3978,3984,3990,3996,4002,4008,4014,4020,4026,4031,4037,4043,4048,4054,4060,4066,4072,4078,4083,4088,4093,4099,4104,4109,4114,4120,4126,4132,4138,4144,4150,4156,4162,4168,4174,4179,4184,4189,4194,4199,4204,4210,4216,4222,4228,4233,4238,4243,4248,4254,4260,4265,4271,4277,4282,4287,4292,4297,4302,4307,4312,4317,4322,4327,4332,4337,4342,4347],{"__ignoreMap":20},[25,2959,2960],{"class":27,"line":28},[25,2961,2962],{},"// API キーやIDを管理する設定オブジェクト\n",[25,2964,2965],{"class":27,"line":35},[25,2966,2312],{},[25,2968,2969],{"class":27,"line":41},[25,2970,2317],{},[25,2972,2973],{"class":27,"line":46},[25,2974,2322],{},[25,2976,2977],{"class":27,"line":52},[25,2978,2327],{},[25,2980,2981],{"class":27,"line":58},[25,2982,2332],{},[25,2984,2985],{"class":27,"line":63},[25,2986,2337],{},[25,2988,2989],{"class":27,"line":69},[25,2990,2342],{},[25,2992,2993],{"class":27,"line":75},[25,2994,32],{"emptyLinePlaceholder":31},[25,2996,2997],{"class":27,"line":80},[25,2998,2999],{},"// Notionの共通ヘッダー設定\n",[25,3001,3002],{"class":27,"line":86},[25,3003,3004],{},"const NOTION_HEADERS = {\n",[25,3006,3007],{"class":27,"line":92},[25,3008,3009],{},"  'Authorization': `Bearer ${CONFIG.NOTION_API_KEY}`,\n",[25,3011,3012],{"class":27,"line":97},[25,3013,3014],{},"  'Notion-Version': CONFIG.NOTION_VERSION,\n",[25,3016,3017],{"class":27,"line":103},[25,3018,3019],{},"  'Content-Type': 'application/json'\n",[25,3021,3022],{"class":27,"line":109},[25,3023,2342],{},[25,3025,3026],{"class":27,"line":114},[25,3027,32],{"emptyLinePlaceholder":31},[25,3029,3030],{"class":27,"line":120},[25,3031,32],{"emptyLinePlaceholder":31},[25,3033,3034],{"class":27,"line":126},[25,3035,32],{"emptyLinePlaceholder":31},[25,3037,3038],{"class":27,"line":132},[25,3039,32],{"emptyLinePlaceholder":31},[25,3041,3042],{"class":27,"line":138},[25,3043,32],{"emptyLinePlaceholder":31},[25,3045,3046],{"class":27,"line":144},[25,3047,3048],{},"// メイン同期処理\n",[25,3050,3051],{"class":27,"line":150},[25,3052,2668],{},[25,3054,3055],{"class":27,"line":156},[25,3056,2673],{},[25,3058,3059],{"class":27,"line":162},[25,3060,3061],{},"    // タスク一覧の取得\n",[25,3063,3064],{"class":27,"line":168},[25,3065,2678],{},[25,3067,3068],{"class":27,"line":174},[25,3069,2683],{},[25,3071,3072],{"class":27,"line":180},[25,3073,2688],{},[25,3075,3076],{"class":27,"line":186},[25,3077,32],{"emptyLinePlaceholder":31},[25,3079,3080],{"class":27,"line":191},[25,3081,3082],{},"    // 現在の状態を構築\n",[25,3084,3085],{"class":27,"line":197},[25,3086,3087],{},"    console.log(\"現在の状態を構築\")\n",[25,3089,3090],{"class":27,"line":203},[25,3091,2697],{},[25,3093,3094],{"class":27,"line":1084},[25,3095,32],{"emptyLinePlaceholder":31},[25,3097,3098],{"class":27,"line":1090},[25,3099,2702],{},[25,3101,3102],{"class":27,"line":1096},[25,3103,1163],{},[25,3105,3106],{"class":27,"line":1102},[25,3107,32],{"emptyLinePlaceholder":31},[25,3109,3110],{"class":27,"line":1108},[25,3111,3112],{},"    console.log(\"タスクの変更を処理\")\n",[25,3114,3115],{"class":27,"line":1113},[25,3116,3117],{},"    // タスクの変更を処理\n",[25,3119,3120],{"class":27,"line":1119},[25,3121,2697],{},[25,3123,3124],{"class":27,"line":1125},[25,3125,3126],{},"      console.log(\"currentState\", currentState[task.id])\n",[25,3128,3129],{"class":27,"line":1131},[25,3130,3131],{},"      console.log(\"previousState\", previousState[task.id])\n",[25,3133,3134],{"class":27,"line":1137},[25,3135,2719],{},[25,3137,3138],{"class":27,"line":1143},[25,3139,1163],{},[25,3141,3142],{"class":27,"line":1149},[25,3143,32],{"emptyLinePlaceholder":31},[25,3145,3146],{"class":27,"line":1154},[25,3147,3148],{},"    // 削除されたタスクを処理\n",[25,3150,3151],{"class":27,"line":1160},[25,3152,3153],{},"    console.log(\"削除されたタスクを処理\")\n",[25,3155,3156],{"class":27,"line":1166},[25,3157,2732],{},[25,3159,3160],{"class":27,"line":1172},[25,3161,32],{"emptyLinePlaceholder":31},[25,3163,3164],{"class":27,"line":1177},[25,3165,3166],{},"    // 現在の状態を保存\n",[25,3168,3169],{"class":27,"line":1183},[25,3170,3171],{},"    console.log(\"現在の状態を保存\")\n",[25,3173,3175],{"class":27,"line":3174},50,[25,3176,2737],{},[25,3178,3180],{"class":27,"line":3179},51,[25,3181,32],{"emptyLinePlaceholder":31},[25,3183,3185],{"class":27,"line":3184},52,[25,3186,2746],{},[25,3188,3190],{"class":27,"line":3189},53,[25,3191,2751],{},[25,3193,3195],{"class":27,"line":3194},54,[25,3196,1038],{},[25,3198,3200],{"class":27,"line":3199},55,[25,3201,1186],{},[25,3203,3205],{"class":27,"line":3204},56,[25,3206,32],{"emptyLinePlaceholder":31},[25,3208,3210],{"class":27,"line":3209},57,[25,3211,32],{"emptyLinePlaceholder":31},[25,3213,3215],{"class":27,"line":3214},58,[25,3216,32],{"emptyLinePlaceholder":31},[25,3218,3220],{"class":27,"line":3219},59,[25,3221,32],{"emptyLinePlaceholder":31},[25,3223,3225],{"class":27,"line":3224},60,[25,3226,2359],{},[25,3228,3230],{"class":27,"line":3229},61,[25,3231,2364],{},[25,3233,3235],{"class":27,"line":3234},62,[25,3236,2369],{},[25,3238,3240],{"class":27,"line":3239},63,[25,3241,2374],{},[25,3243,3245],{"class":27,"line":3244},64,[25,3246,2379],{},[25,3248,3250],{"class":27,"line":3249},65,[25,3251,2384],{},[25,3253,3255],{"class":27,"line":3254},66,[25,3256,2389],{},[25,3258,3260],{"class":27,"line":3259},67,[25,3261,2394],{},[25,3263,3265],{"class":27,"line":3264},68,[25,3266,2399],{},[25,3268,3270],{"class":27,"line":3269},69,[25,3271,2404],{},[25,3273,3275],{"class":27,"line":3274},70,[25,3276,2409],{},[25,3278,3280],{"class":27,"line":3279},71,[25,3281,2414],{},[25,3283,3285],{"class":27,"line":3284},72,[25,3286,2419],{},[25,3288,3290],{"class":27,"line":3289},73,[25,3291,2424],{},[25,3293,3295],{"class":27,"line":3294},74,[25,3296,1169],{},[25,3298,3300],{"class":27,"line":3299},75,[25,3301,32],{"emptyLinePlaceholder":31},[25,3303,3305],{"class":27,"line":3304},76,[25,3306,3307],{},"  console.log(\"next_cursor\", JSON.parse(response.getContentText()).next_cursor)\n",[25,3309,3311],{"class":27,"line":3310},77,[25,3312,3313],{},"  return JSON.parse(response.getContentText()).results;\n",[25,3315,3317],{"class":27,"line":3316},78,[25,3318,1186],{},[25,3320,3322],{"class":27,"line":3321},79,[25,3323,32],{"emptyLinePlaceholder":31},[25,3325,3327],{"class":27,"line":3326},80,[25,3328,2441],{},[25,3330,3332],{"class":27,"line":3331},81,[25,3333,2446],{},[25,3335,3337],{"class":27,"line":3336},82,[25,3338,2451],{},[25,3340,3342],{"class":27,"line":3341},83,[25,3343,2456],{},[25,3345,3347],{"class":27,"line":3346},84,[25,3348,2461],{},[25,3350,3352],{"class":27,"line":3351},85,[25,3353,2384],{},[25,3355,3357],{"class":27,"line":3356},86,[25,3358,2389],{},[25,3360,3362],{"class":27,"line":3361},87,[25,3363,2474],{},[25,3365,3367],{"class":27,"line":3366},88,[25,3368,2479],{},[25,3370,3372],{"class":27,"line":3371},89,[25,3373,2484],{},[25,3375,3377],{"class":27,"line":3376},90,[25,3378,2489],{},[25,3380,3382],{"class":27,"line":3381},91,[25,3383,2494],{},[25,3385,3387],{"class":27,"line":3386},92,[25,3388,2414],{},[25,3390,3392],{"class":27,"line":3391},93,[25,3393,2503],{},[25,3395,3397],{"class":27,"line":3396},94,[25,3398,2424],{},[25,3400,3402],{"class":27,"line":3401},95,[25,3403,1169],{},[25,3405,3407],{"class":27,"line":3406},96,[25,3408,1186],{},[25,3410,3412],{"class":27,"line":3411},97,[25,3413,32],{"emptyLinePlaceholder":31},[25,3415,3417],{"class":27,"line":3416},98,[25,3418,3419],{},"// カレンダーイベントの新規作成\n",[25,3421,3423],{"class":27,"line":3422},99,[25,3424,3425],{},"function createCalendarEvent(task, CALENDAR_ID) {\n",[25,3427,3429],{"class":27,"line":3428},100,[25,3430,3431],{},"  const calendar = CalendarApp.getCalendarById(CALENDAR_ID);\n",[25,3433,3435],{"class":27,"line":3434},101,[25,3436,2542],{},[25,3438,3440],{"class":27,"line":3439},102,[25,3441,2547],{},[25,3443,3445],{"class":27,"line":3444},103,[25,3446,32],{"emptyLinePlaceholder":31},[25,3448,3450],{"class":27,"line":3449},104,[25,3451,3452],{},"  if (!dueDate) return\n",[25,3454,3456],{"class":27,"line":3455},105,[25,3457,32],{"emptyLinePlaceholder":31},[25,3459,3461],{"class":27,"line":3460},106,[25,3462,2556],{},[25,3464,3466],{"class":27,"line":3465},107,[25,3467,2561],{},[25,3469,3471],{"class":27,"line":3470},108,[25,3472,2566],{},[25,3474,3476],{"class":27,"line":3475},109,[25,3477,3478],{},"    { description: `Notion Task ID: ${task.id}\\nURL: ${task.url}` }\n",[25,3480,3482],{"class":27,"line":3481},110,[25,3483,2576],{},[25,3485,3487],{"class":27,"line":3486},111,[25,3488,32],{"emptyLinePlaceholder":31},[25,3490,3492],{"class":27,"line":3491},112,[25,3493,3494],{},"  console.log(event)\n",[25,3496,3498],{"class":27,"line":3497},113,[25,3499,2585],{},[25,3501,3503],{"class":27,"line":3502},114,[25,3504,1186],{},[25,3506,3508],{"class":27,"line":3507},115,[25,3509,32],{"emptyLinePlaceholder":31},[25,3511,3513],{"class":27,"line":3512},116,[25,3514,3515],{},"// カレンダーイベントの更新\n",[25,3517,3519],{"class":27,"line":3518},117,[25,3520,3521],{},"function updateCalendarEvent(eventId, task) {\n",[25,3523,3525],{"class":27,"line":3524},118,[25,3526,2537],{},[25,3528,3530],{"class":27,"line":3529},119,[25,3531,3532],{},"  const event = calendar.getEventById(eventId);\n",[25,3534,3536],{"class":27,"line":3535},120,[25,3537,3538],{},"  if (!event) return;\n",[25,3540,3542],{"class":27,"line":3541},121,[25,3543,32],{"emptyLinePlaceholder":31},[25,3545,3547],{"class":27,"line":3546},122,[25,3548,2542],{},[25,3550,3552],{"class":27,"line":3551},123,[25,3553,2547],{},[25,3555,3557],{"class":27,"line":3556},124,[25,3558,32],{"emptyLinePlaceholder":31},[25,3560,3562],{"class":27,"line":3561},125,[25,3563,3564],{},"  event.setTitle(title);\n",[25,3566,3568],{"class":27,"line":3567},126,[25,3569,3570],{},"  event.setAllDayDate(dueDate);\n",[25,3572,3574],{"class":27,"line":3573},127,[25,3575,3576],{},"  event.setDescription(`Notion Task ID: ${task.id}\\nURL: ${task.url}`);\n",[25,3578,3580],{"class":27,"line":3579},128,[25,3581,1186],{},[25,3583,3585],{"class":27,"line":3584},129,[25,3586,32],{"emptyLinePlaceholder":31},[25,3588,3590],{"class":27,"line":3589},130,[25,3591,3592],{},"// カレンダーイベントの削除\n",[25,3594,3596],{"class":27,"line":3595},131,[25,3597,3598],{},"function deleteCalendarEvent(eventId) {\n",[25,3600,3602],{"class":27,"line":3601},132,[25,3603,2537],{},[25,3605,3607],{"class":27,"line":3606},133,[25,3608,32],{"emptyLinePlaceholder":31},[25,3610,3612],{"class":27,"line":3611},134,[25,3613,2673],{},[25,3615,3617],{"class":27,"line":3616},135,[25,3618,3619],{},"    const event = calendar.getEventById(eventId);\n",[25,3621,3623],{"class":27,"line":3622},136,[25,3624,3625],{},"    if (event) {\n",[25,3627,3629],{"class":27,"line":3628},137,[25,3630,3631],{},"      event.deleteEvent();\n",[25,3633,3635],{"class":27,"line":3634},138,[25,3636,3637],{},"      return true\n",[25,3639,3641],{"class":27,"line":3640},139,[25,3642,1526],{},[25,3644,3646],{"class":27,"line":3645},140,[25,3647,3648],{},"  } catch (e) {\n",[25,3650,3652],{"class":27,"line":3651},141,[25,3653,3654],{},"    console.error(\"削除されている\", e)\n",[25,3656,3658],{"class":27,"line":3657},142,[25,3659,3660],{},"    return false\n",[25,3662,3664],{"class":27,"line":3663},143,[25,3665,32],{"emptyLinePlaceholder":31},[25,3667,3669],{"class":27,"line":3668},144,[25,3670,1038],{},[25,3672,3674],{"class":27,"line":3673},145,[25,3675,32],{"emptyLinePlaceholder":31},[25,3677,3679],{"class":27,"line":3678},146,[25,3680,3681],{},"  return false\n",[25,3683,3685],{"class":27,"line":3684},147,[25,3686,1186],{},[25,3688,3690],{"class":27,"line":3689},148,[25,3691,32],{"emptyLinePlaceholder":31},[25,3693,3695],{"class":27,"line":3694},149,[25,3696,2610],{},[25,3698,3700],{"class":27,"line":3699},150,[25,3701,2615],{},[25,3703,3705],{"class":27,"line":3704},151,[25,3706,2620],{},[25,3708,3710],{"class":27,"line":3709},152,[25,3711,2625],{},[25,3713,3715],{"class":27,"line":3714},153,[25,3716,2630],{},[25,3718,3720],{"class":27,"line":3719},154,[25,3721,2635],{},[25,3723,3725],{"class":27,"line":3724},155,[25,3726,2640],{},[25,3728,3730],{"class":27,"line":3729},156,[25,3731,2645],{},[25,3733,3735],{"class":27,"line":3734},157,[25,3736,2650],{},[25,3738,3740],{"class":27,"line":3739},158,[25,3741,1186],{},[25,3743,3745],{"class":27,"line":3744},159,[25,3746,32],{"emptyLinePlaceholder":31},[25,3748,3750],{"class":27,"line":3749},160,[25,3751,3752],{},"// キャッシュから前回の状態を取得\n",[25,3754,3756],{"class":27,"line":3755},161,[25,3757,3758],{},"function getPreviousState() {\n",[25,3760,3762],{"class":27,"line":3761},162,[25,3763,3764],{},"  const cache = CacheService.getScriptCache();\n",[25,3766,3768],{"class":27,"line":3767},163,[25,3769,3770],{},"  const data = cache.get('previousState');\n",[25,3772,3774],{"class":27,"line":3773},164,[25,3775,32],{"emptyLinePlaceholder":31},[25,3777,3779],{"class":27,"line":3778},165,[25,3780,3781],{},"  console.log(JSON.parse(data))\n",[25,3783,3785],{"class":27,"line":3784},166,[25,3786,3787],{},"  return data ? JSON.parse(data) : {};\n",[25,3789,3791],{"class":27,"line":3790},167,[25,3792,1186],{},[25,3794,3796],{"class":27,"line":3795},168,[25,3797,32],{"emptyLinePlaceholder":31},[25,3799,3801],{"class":27,"line":3800},169,[25,3802,3803],{},"// 現在の状態をキャッシュに保存（6時間有効）\n",[25,3805,3807],{"class":27,"line":3806},170,[25,3808,3809],{},"function savePreviousState(state) {\n",[25,3811,3813],{"class":27,"line":3812},171,[25,3814,3764],{},[25,3816,3818],{"class":27,"line":3817},172,[25,3819,3820],{},"  cache.put('previousState', JSON.stringify(state), 21600);\n",[25,3822,3824],{"class":27,"line":3823},173,[25,3825,1186],{},[25,3827,3829],{"class":27,"line":3828},174,[25,3830,32],{"emptyLinePlaceholder":31},[25,3832,3834],{"class":27,"line":3833},175,[25,3835,3836],{},"// タスクの変更を検出して必要な処理を実行\n",[25,3838,3840],{"class":27,"line":3839},176,[25,3841,3842],{},"function processTaskChanges(task, previousState, currentState) {\n",[25,3844,3846],{"class":27,"line":3845},177,[25,3847,3848],{},"  const taskId = task.id;\n",[25,3850,3852],{"class":27,"line":3851},178,[25,3853,3854],{},"  const prevTask = previousState[taskId];\n",[25,3856,3858],{"class":27,"line":3857},179,[25,3859,3860],{},"  const currentTask = currentState[taskId];\n",[25,3862,3864],{"class":27,"line":3863},180,[25,3865,32],{"emptyLinePlaceholder":31},[25,3867,3869],{"class":27,"line":3868},181,[25,3870,2673],{},[25,3872,3874],{"class":27,"line":3873},182,[25,3875,3876],{},"    if (!prevTask && task.properties.DueDate?.date?.start) {\n",[25,3878,3880],{"class":27,"line":3879},183,[25,3881,3882],{},"      // 新規タスクの処理\n",[25,3884,3886],{"class":27,"line":3885},184,[25,3887,3888],{},"      console.log(\"新規タスクの処理\")\n",[25,3890,3892],{"class":27,"line":3891},185,[25,3893,3894],{},"      const calendarEventId = createCalendarEvent(task, CONFIG.CALENDAR_ID);\n",[25,3896,3898],{"class":27,"line":3897},186,[25,3899,3900],{},"      updateNotionTask(taskId, calendarEventId);\n",[25,3902,3904],{"class":27,"line":3903},187,[25,3905,3906],{},"    } else if (prevTask && prevTask.dueDate) {\n",[25,3908,3910],{"class":27,"line":3909},188,[25,3911,3912],{},"      // 既存タスクの処理\n",[25,3914,3916],{"class":27,"line":3915},189,[25,3917,3918],{},"      console.log(\"既存タスクの処理\")\n",[25,3920,3922],{"class":27,"line":3921},190,[25,3923,3924],{},"      const calendarEventId = prevTask.calendarEventId;\n",[25,3926,3928],{"class":27,"line":3927},191,[25,3929,3930],{},"      if (currentTask.status === 'Deleted') {\n",[25,3932,3934],{"class":27,"line":3933},192,[25,3935,3936],{},"        // 削除されたタスクの処理\n",[25,3938,3940],{"class":27,"line":3939},193,[25,3941,3942],{},"        console.log(\"削除されたタスクの処理\")\n",[25,3944,3946],{"class":27,"line":3945},194,[25,3947,3948],{},"        deleteCalendarEvent(calendarEventId);\n",[25,3950,3952],{"class":27,"line":3951},195,[25,3953,32],{"emptyLinePlaceholder":31},[25,3955,3957],{"class":27,"line":3956},196,[25,3958,3959],{},"      } else if (\n",[25,3961,3963],{"class":27,"line":3962},197,[25,3964,3965],{},"        prevTask.title !== currentTask.title ||\n",[25,3967,3969],{"class":27,"line":3968},198,[25,3970,3971],{},"        prevTask.dueDate !== currentTask.dueDate\n",[25,3973,3975],{"class":27,"line":3974},199,[25,3976,3977],{},"      ) {\n",[25,3979,3981],{"class":27,"line":3980},200,[25,3982,3983],{},"        // タスクが更新された場合の処理\n",[25,3985,3987],{"class":27,"line":3986},201,[25,3988,3989],{},"        console.log(\"タスクが更新された場合の処理\")\n",[25,3991,3993],{"class":27,"line":3992},202,[25,3994,3995],{},"        updateCalendarEvent(calendarEventId, task);\n",[25,3997,3999],{"class":27,"line":3998},203,[25,4000,4001],{},"      } else if (currentTask.status === 'Done') {\n",[25,4003,4005],{"class":27,"line":4004},204,[25,4006,4007],{},"        // ステータスが完了タスクの処理\n",[25,4009,4011],{"class":27,"line":4010},205,[25,4012,4013],{},"        console.log(\"ステータスが完了タスクの処理\")\n",[25,4015,4017],{"class":27,"line":4016},206,[25,4018,4019],{},"        const reslut = deleteCalendarEvent(calendarEventId);\n",[25,4021,4023],{"class":27,"line":4022},207,[25,4024,4025],{},"        console.log(\"ステータスが完了タスクの処理終了 google カレンダー削除 \",reslut)\n",[25,4027,4029],{"class":27,"line":4028},208,[25,4030,32],{"emptyLinePlaceholder":31},[25,4032,4034],{"class":27,"line":4033},209,[25,4035,4036],{},"        // 削除がない場合終了\n",[25,4038,4040],{"class":27,"line":4039},210,[25,4041,4042],{},"        if (!reslut) return\n",[25,4044,4046],{"class":27,"line":4045},211,[25,4047,32],{"emptyLinePlaceholder":31},[25,4049,4051],{"class":27,"line":4050},212,[25,4052,4053],{},"        console.log(\"別カレンダーに完了を作成\")\n",[25,4055,4057],{"class":27,"line":4056},213,[25,4058,4059],{},"        // 別カレンダーに完了を作成\n",[25,4061,4063],{"class":27,"line":4062},214,[25,4064,4065],{},"        createCalendarEvent(task, CONFIG.DONE_CALENDAR_ID);\n",[25,4067,4069],{"class":27,"line":4068},215,[25,4070,4071],{},"        updateNotionTask(taskId, \"done\");\n",[25,4073,4075],{"class":27,"line":4074},216,[25,4076,4077],{},"        console.log(\"別カレンダーに完了を作成終了\")\n",[25,4079,4081],{"class":27,"line":4080},217,[25,4082,2503],{},[25,4084,4086],{"class":27,"line":4085},218,[25,4087,1526],{},[25,4089,4091],{"class":27,"line":4090},219,[25,4092,2746],{},[25,4094,4096],{"class":27,"line":4095},220,[25,4097,4098],{},"    logError(error, `タスク処理エラー - TaskID: ${taskId}`);\n",[25,4100,4102],{"class":27,"line":4101},221,[25,4103,1038],{},[25,4105,4107],{"class":27,"line":4106},222,[25,4108,1186],{},[25,4110,4112],{"class":27,"line":4111},223,[25,4113,32],{"emptyLinePlaceholder":31},[25,4115,4117],{"class":27,"line":4116},224,[25,4118,4119],{},"// 削除されたタスクの処理\n",[25,4121,4123],{"class":27,"line":4122},225,[25,4124,4125],{},"function processDeletedTasks(previousState, currentState) {\n",[25,4127,4129],{"class":27,"line":4128},226,[25,4130,4131],{},"  Object.keys(previousState).forEach(taskId => {\n",[25,4133,4135],{"class":27,"line":4134},227,[25,4136,4137],{},"    if (!currentState[taskId]) {\n",[25,4139,4141],{"class":27,"line":4140},228,[25,4142,4143],{},"      const calendarEventId = previousState[taskId].calendarEventId;\n",[25,4145,4147],{"class":27,"line":4146},229,[25,4148,4149],{},"      if (calendarEventId) {\n",[25,4151,4153],{"class":27,"line":4152},230,[25,4154,4155],{},"        try {\n",[25,4157,4159],{"class":27,"line":4158},231,[25,4160,4161],{},"          deleteCalendarEvent(calendarEventId);\n",[25,4163,4165],{"class":27,"line":4164},232,[25,4166,4167],{},"        } catch (error) {\n",[25,4169,4171],{"class":27,"line":4170},233,[25,4172,4173],{},"          logError(error, `削除済みタスクの処理エラー - TaskID: ${taskId}`);\n",[25,4175,4177],{"class":27,"line":4176},234,[25,4178,2414],{},[25,4180,4182],{"class":27,"line":4181},235,[25,4183,2503],{},[25,4185,4187],{"class":27,"line":4186},236,[25,4188,1526],{},[25,4190,4192],{"class":27,"line":4191},237,[25,4193,1169],{},[25,4195,4197],{"class":27,"line":4196},238,[25,4198,1186],{},[25,4200,4202],{"class":27,"line":4201},239,[25,4203,32],{"emptyLinePlaceholder":31},[25,4205,4207],{"class":27,"line":4206},240,[25,4208,4209],{},"// エラーログの記録\n",[25,4211,4213],{"class":27,"line":4212},241,[25,4214,4215],{},"function logError(error, context = '') {\n",[25,4217,4219],{"class":27,"line":4218},242,[25,4220,4221],{},"  console.error(`同期エラー ${context}:`, error);\n",[25,4223,4225],{"class":27,"line":4224},243,[25,4226,4227],{},"  // 必要に応じて追加のエラーハンドリング（Slack通知やメール送信など）\n",[25,4229,4231],{"class":27,"line":4230},244,[25,4232,32],{"emptyLinePlaceholder":31},[25,4234,4236],{"class":27,"line":4235},245,[25,4237,32],{"emptyLinePlaceholder":31},[25,4239,4241],{"class":27,"line":4240},246,[25,4242,1186],{},[25,4244,4246],{"class":27,"line":4245},247,[25,4247,32],{"emptyLinePlaceholder":31},[25,4249,4251],{"class":27,"line":4250},248,[25,4252,4253],{},"// 特定のキャッシュキーを削除する関数\n",[25,4255,4257],{"class":27,"line":4256},249,[25,4258,4259],{},"function clearPreviousStateCache() {\n",[25,4261,4263],{"class":27,"line":4262},250,[25,4264,3764],{},[25,4266,4268],{"class":27,"line":4267},251,[25,4269,4270],{},"  cache.remove('previousState');\n",[25,4272,4274],{"class":27,"line":4273},252,[25,4275,4276],{},"  console.log(\"キャッシュ 'previousState' を削除しました\");\n",[25,4278,4280],{"class":27,"line":4279},253,[25,4281,1186],{},[25,4283,4285],{"class":27,"line":4284},254,[25,4286,32],{"emptyLinePlaceholder":31},[25,4288,4290],{"class":27,"line":4289},255,[25,4291,2806],{},[25,4293,4295],{"class":27,"line":4294},256,[25,4296,2811],{},[25,4298,4300],{"class":27,"line":4299},257,[25,4301,2816],{},[25,4303,4305],{"class":27,"line":4304},258,[25,4306,2821],{},[25,4308,4310],{"class":27,"line":4309},259,[25,4311,2826],{},[25,4313,4315],{"class":27,"line":4314},260,[25,4316,1169],{},[25,4318,4320],{"class":27,"line":4319},261,[25,4321,32],{"emptyLinePlaceholder":31},[25,4323,4325],{"class":27,"line":4324},262,[25,4326,2839],{},[25,4328,4330],{"class":27,"line":4329},263,[25,4331,2844],{},[25,4333,4335],{"class":27,"line":4334},264,[25,4336,2849],{},[25,4338,4340],{"class":27,"line":4339},265,[25,4341,2854],{},[25,4343,4345],{"class":27,"line":4344},266,[25,4346,2859],{},[25,4348,4350],{"class":27,"line":4349},267,[25,4351,1186],{},[11,4353,4354],{"id":4354},"注意点",[1402,4356,4357,4368,4382],{},[307,4358,4359,4360],{},"APIキーの管理\n",[304,4361,4362,4365],{},[307,4363,4364],{},"重要な認証情報は適切に管理",[307,4366,4367],{},"プロジェクト設定での管理を推奨",[307,4369,4370,4371],{},"エラー処理\n",[304,4372,4373,4376,4379],{},[307,4374,4375],{},"ネットワークエラーへの対応",[307,4377,4378],{},"API制限の考慮→ noiton api (１回で100件のページしかとれない)とgasの制限に注意 (稼働時間、fetchのリクエスト回数など)",[307,4380,4381],{},"データ整合性の確保→手動編集する場合はnotinのみ編集する",[307,4383,4384,4385],{},"パフォーマンス\n",[304,4386,4387,4390,4393],{},[307,4388,4389],{},"不要な API 呼び出しの削減",[307,4391,4392],{},"キャッシュの活用",[307,4394,4395],{},"適切な実行間隔の設定",[11,4397,518],{"id":518},[238,4399,4400],{},"このシステムにより、NotionとGoogleカレンダーの連携が自動化され、タスク管理がより効率的になります。実装方法は目的や好みに応じて選択できます。",[238,4402,4403],{},"エラー処理やパフォーマンスの最適化など、実運用時の考慮点も含めて実装することで、より安定した運用が可能になります。",[11,4405,4406],{"id":4406},"参考文献",[304,4408,4409,4416,4423],{},[307,4410,4411],{},[1544,4412,4415],{"href":4413,"rel":4414},"https://developers.notion.com/",[1548],"Notion API Documentation",[307,4417,4418],{},[1544,4419,4422],{"href":4420,"rel":4421},"https://developers.google.com/calendar",[1548],"Google Calendar API Documentation",[307,4424,4425],{},[1544,4426,4429],{"href":4427,"rel":4428},"https://developers.google.com/apps-script",[1548],"Google Apps Script Documentation",[208,4431,210],{},{"title":20,"searchDepth":35,"depth":35,"links":4433},[4434,4435,4439,4449,4454,4455,4456,4457,4458],{"id":890,"depth":35,"text":890},{"id":2258,"depth":35,"text":2258,"children":4436},[4437,4438],{"id":2261,"depth":41,"text":2261},{"id":2278,"depth":41,"text":2278},{"id":2295,"depth":35,"text":2295,"children":4440},[4441,4442,4443,4444,4445,4446,4447,4448],{"id":2298,"depth":41,"text":2299},{"id":2345,"depth":41,"text":2346},{"id":2349,"depth":41,"text":2349},{"id":2431,"depth":41,"text":2431},{"id":2518,"depth":41,"text":2519},{"id":2522,"depth":41,"text":2522},{"id":2592,"depth":41,"text":2593},{"id":2657,"depth":41,"text":2658},{"id":2762,"depth":35,"text":2762,"children":4450},[4451,4452,4453],{"id":2765,"depth":41,"text":2766},{"id":2780,"depth":41,"text":2781},{"id":2795,"depth":41,"text":2796},{"id":2866,"depth":35,"text":2286},{"id":2889,"depth":35,"text":2889},{"id":4354,"depth":35,"text":4354},{"id":518,"depth":35,"text":518},{"id":4406,"depth":35,"text":4406},[1443],"2024-11-03T00:00:00.000Z","Notionのタスクの期限日をGoogleカレンダーへ自動同期し、完了タスクは別カレンダーへ移すシステムの実装方法",{},"/posts/notion-to-google-calender-1103",{"title":2245,"description":4461},"posts/notion-to-google-calender-1103",[1443,1452,4467,1451,4468],"Notion","Google Calender","UYNsU6I5BOAB7lrXRWuFN6DlO8thSRy133DJXQEh6-k",{"id":4471,"title":4472,"body":4473,"categories":4558,"cross_post":215,"date":4559,"description":4560,"extension":218,"image":20,"meta":4561,"navigation":31,"note_id":215,"note_url":215,"path":4562,"private":221,"qiita_id":215,"qiita_url":215,"seo":4563,"stem":4564,"tags":4565,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":4567},"posts/posts/nuxt-blog.md","nuxtを使ったblog",{"type":8,"value":4474,"toc":4553},[4475,4478,4484,4487,4490,4504,4507,4512,4515,4531,4534,4539,4542,4550],[238,4476,4477],{},"自分のブログを下記の構成でつくってみました。",[238,4479,4480],{},[1544,4481,4482],{"href":4482,"rel":4483},"https://tori-dev.com/",[1548],[11,4485,4486],{"id":4486},"機能",[238,4488,4489],{},"@nuxt/contentを使用したブログ作成のメイン機能について説明します。以下の機能が含まれます。",[304,4491,4492,4495,4498,4501],{},[307,4493,4494],{},"カテゴリー",[307,4496,4497],{},"タグ",[307,4499,4500],{},"関連記事",[307,4502,4503],{},"目次",[238,4505,4506],{},"また、アイキャッチの自動生成は現在のところ実装されていませんが、今後のアップデートで追加予定です。",[11,4508,4510],{"id":4509},"記事の作成方法",[904,4511,4509],{},[238,4513,4514],{},"ブログ記事の作成方法は以下のいずれかを選ぶことができます。",[1402,4516,4517,4528],{},[307,4518,4519,4520],{},"ローカルでダウンロードしてデプロイする方法\n",[304,4521,4522,4525],{},[307,4523,4524],{},"Notionを使用する場合",[307,4526,4527],{},"Markdownを使用する場合（Google Drive + Markdownツールなどを利用）",[307,4529,4530],{},"microCMS（ヘッドレスCMS）を使用する方法",[238,4532,4533],{},"それぞれの方法によって、使いやすさや環境に合わせて選択できます。",[11,4535,4537],{"id":4536},"デプロイ先",[904,4538,4536],{},[238,4540,4541],{},"作成したブログを公開するためのデプロイ先は、以下のオプションがあります。",[1402,4543,4544,4547],{},[307,4545,4546],{},"Firebase Hosting",[307,4548,4549],{},"Netlify",[238,4551,4552],{},"どちらのプラットフォームも高性能で信頼性があり、使いやすいインターフェースを提供しています。",{"title":20,"searchDepth":35,"depth":35,"links":4554},[4555,4556,4557],{"id":4486,"depth":35,"text":4486},{"id":4509,"depth":35,"text":4509},{"id":4536,"depth":35,"text":4536},[1443],"2023-06-13T00:00:00.000Z","@nuxt/contentでカテゴリー・タグ・関連記事・目次機能を備えた自分のブログを作った構成の紹介",{},"/posts/nuxt-blog",{"title":4472,"description":4560},"posts/nuxt-blog",[1443,4566],"nuxt","qHAf8eLhZLVjnD_Zd6RunYOK8TGmelSJtGlmSyL47zc",{"id":4569,"title":4570,"body":4571,"categories":4603,"cross_post":215,"date":4604,"description":4605,"extension":218,"image":20,"meta":4606,"navigation":31,"note_id":215,"note_url":215,"path":4607,"private":221,"qiita_id":215,"qiita_url":215,"seo":4608,"stem":4609,"tags":4610,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":4611},"posts/posts/nuxtLifeCycleMemo.md","nuxtライフサイクルmemo",{"type":8,"value":4572,"toc":4601},[4573],[304,4574,4575,4578,4589,4595],{},[307,4576,4577],{},"asyncDataはssaのときはクライアントでssgのときはgenerate時にしかできない",[307,4579,4580,4581],{},"以下はクライアントで動く\n",[304,4582,4583,4586],{},[307,4584,4585],{},"created：インスタンス初期化時、DOMが生成される前",[307,4587,4588],{},"mounted：インスタンス初期化時、DOMが生成された後",[307,4590,4591,4592],{},"computed： 算出プロパティ",[904,4593,4594],{},"getter,setterが使える",[307,4596,4597,4598],{},"watch：",[904,4599,4600],{},"データの変化をトリガにしたフック",{"title":20,"searchDepth":35,"depth":35,"links":4602},[],[1443],"2021-11-10T00:00:00.000Z","NuxtのasyncData・created・mounted・computed・watchなどライフサイクルの挙動を整理したメモ",{},"/posts/nuxtlifecyclememo",{"title":4570,"description":4605},"posts/nuxtLifeCycleMemo",[1443,4566],"istfZbodTDu1ykAFnNNP4fmGEzSjlnfGucXNM-WALyY",{"id":4613,"title":4614,"body":4615,"categories":5093,"cross_post":215,"date":4460,"description":5095,"extension":218,"image":20,"meta":5096,"navigation":31,"note_id":215,"note_url":215,"path":5097,"private":221,"qiita_id":215,"qiita_url":215,"seo":5098,"stem":5099,"tags":5100,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":5102},"posts/posts/try-react-signature-canvas.md","reactでサイン機能をするためにreact-signature-canvasためしてみた",{"type":8,"value":4616,"toc":5087},[4617,4622,4625,4629,4643,4646,4649,4652,5069,5071,5078,5085],[11,4618,4620],{"id":4619},"react-signature-canvas",[904,4621,4619],{},[238,4623,4624],{},"react-signature-canvasは、Reactアプリケーションでサイン機能を簡単に実装できる人気のライブラリ",[1204,4626,4628],{"id":4627},"主な特徴","主な特徴:",[304,4630,4631,4634,4637,4640],{},[307,4632,4633],{},"キャンバスベースのシンプルなサイン機能",[307,4635,4636],{},"タッチデバイスとマウスの両方に対応",[307,4638,4639],{},"サインのクリア、保存、読み込みなどの基本機能を提供",[307,4641,4642],{},"カスタマイズ可能なスタイルとオプション",[1204,4644,4645],{"id":4645},"やってみて",[238,4647,4648],{},"公式を見ながらやったら意外といけた",[238,4650,4651],{},"useRefを使うのと保存したデータURLを取り込んだ時に画像が小さくなってしまうとこに少し困った。",[15,4653,4655],{"className":17,"code":4654,"language":19,"meta":20,"style":20},"\nimport SignatureCanvas from \"react-signature-canvas\";\nimport { FC, useState, useRef, useEffect } from \"react\";\n\n\n\n\n/**\n * サイン\n *\n * @returns サイン\n */\nconst Signature: FC\u003CProps> = () => {\n\n\n  const [trimmedDataURL, setTrimmedDataURL] = useState\u003Cstring>(\"\");\n  const padRef = useRef\u003CSignatureCanvas>(null);\n\n\n  /* -------------------------------- Methods ------------------------------- */\n\n  /**\n   * サインクリア\n   *\n   */\n  const clear = () => {\n    padRef.current?.clear();\n  };\n\n  /**\n   *サインURlに変換保存\n   *\n   */\n  const trim = () => {\n    const url = padRef.current?.getTrimmedCanvas().toDataURL(\"image/png\");\n    if (url) {\n      setTrimmedDataURL(url);\n\n      // どこかへ保存する\n    }\n  };\n\n  useEffect(() => {\n    /**\n     *初期実行\n     *\n     */\n    const init = async () => {\n\n                const url = \"ここで保存先から取得\"\n          \n          // fromDataURLでSignatureCanvasに\n          // 保存したデータURL取り込むきちんと幅と高さを合わせないと画像が小さくなったりする\n        padRef.current?.fromDataURL(url, {\n          width: 800,\n          height: 200\n        });\n        setTrimmedDataURL(url);\n      }\n    };\n\n    init();\n  }, []);\n\n\n  return (\n    \u003C>\n      \u003CSignatureCanvas\n        penColor=\"white\"\n        backgroundColor=\"gray\"\n        canvasProps={{ width: 800, height: 200 }}\n        ref={padRef}\n      />\n      \u003Cdiv>\n        {trimmedDataURL ? (\n          \u003Cimg alt=\"signature\" src={trimmedDataURL} width={80} height={20} />\n        ) : null}\n      \u003C/div>Ï\n          \u003CButton onClick={() => clear()} >\n            clear\n          \u003C/Button>\n          \u003CButton onClick={() => trim()} >\n               trim\n          \u003C/Button>\n\n    \u003C/>\n  );\n};\n\n\n\n\n",[22,4656,4657,4661,4666,4671,4675,4679,4683,4687,4692,4697,4702,4707,4712,4717,4721,4725,4730,4735,4739,4743,4748,4752,4757,4762,4767,4772,4777,4782,4786,4790,4794,4799,4803,4807,4812,4817,4822,4827,4831,4836,4840,4844,4848,4853,4858,4863,4868,4873,4878,4882,4887,4892,4897,4902,4907,4912,4917,4922,4927,4931,4936,4940,4945,4950,4954,4958,4963,4968,4973,4978,4983,4988,4993,4998,5003,5008,5013,5018,5023,5028,5033,5038,5043,5048,5052,5056,5061,5065],{"__ignoreMap":20},[25,4658,4659],{"class":27,"line":28},[25,4660,32],{"emptyLinePlaceholder":31},[25,4662,4663],{"class":27,"line":35},[25,4664,4665],{},"import SignatureCanvas from \"react-signature-canvas\";\n",[25,4667,4668],{"class":27,"line":41},[25,4669,4670],{},"import { FC, useState, useRef, useEffect } from \"react\";\n",[25,4672,4673],{"class":27,"line":46},[25,4674,32],{"emptyLinePlaceholder":31},[25,4676,4677],{"class":27,"line":52},[25,4678,32],{"emptyLinePlaceholder":31},[25,4680,4681],{"class":27,"line":58},[25,4682,32],{"emptyLinePlaceholder":31},[25,4684,4685],{"class":27,"line":63},[25,4686,32],{"emptyLinePlaceholder":31},[25,4688,4689],{"class":27,"line":69},[25,4690,4691],{},"/**\n",[25,4693,4694],{"class":27,"line":75},[25,4695,4696],{}," * サイン\n",[25,4698,4699],{"class":27,"line":80},[25,4700,4701],{}," *\n",[25,4703,4704],{"class":27,"line":86},[25,4705,4706],{}," * @returns サイン\n",[25,4708,4709],{"class":27,"line":92},[25,4710,4711],{}," */\n",[25,4713,4714],{"class":27,"line":97},[25,4715,4716],{},"const Signature: FC\u003CProps> = () => {\n",[25,4718,4719],{"class":27,"line":103},[25,4720,32],{"emptyLinePlaceholder":31},[25,4722,4723],{"class":27,"line":109},[25,4724,32],{"emptyLinePlaceholder":31},[25,4726,4727],{"class":27,"line":114},[25,4728,4729],{},"  const [trimmedDataURL, setTrimmedDataURL] = useState\u003Cstring>(\"\");\n",[25,4731,4732],{"class":27,"line":120},[25,4733,4734],{},"  const padRef = useRef\u003CSignatureCanvas>(null);\n",[25,4736,4737],{"class":27,"line":126},[25,4738,32],{"emptyLinePlaceholder":31},[25,4740,4741],{"class":27,"line":132},[25,4742,32],{"emptyLinePlaceholder":31},[25,4744,4745],{"class":27,"line":138},[25,4746,4747],{},"  /* -------------------------------- Methods ------------------------------- */\n",[25,4749,4750],{"class":27,"line":144},[25,4751,32],{"emptyLinePlaceholder":31},[25,4753,4754],{"class":27,"line":150},[25,4755,4756],{},"  /**\n",[25,4758,4759],{"class":27,"line":156},[25,4760,4761],{},"   * サインクリア\n",[25,4763,4764],{"class":27,"line":162},[25,4765,4766],{},"   *\n",[25,4768,4769],{"class":27,"line":168},[25,4770,4771],{},"   */\n",[25,4773,4774],{"class":27,"line":174},[25,4775,4776],{},"  const clear = () => {\n",[25,4778,4779],{"class":27,"line":180},[25,4780,4781],{},"    padRef.current?.clear();\n",[25,4783,4784],{"class":27,"line":186},[25,4785,2650],{},[25,4787,4788],{"class":27,"line":191},[25,4789,32],{"emptyLinePlaceholder":31},[25,4791,4792],{"class":27,"line":197},[25,4793,4756],{},[25,4795,4796],{"class":27,"line":203},[25,4797,4798],{},"   *サインURlに変換保存\n",[25,4800,4801],{"class":27,"line":1084},[25,4802,4766],{},[25,4804,4805],{"class":27,"line":1090},[25,4806,4771],{},[25,4808,4809],{"class":27,"line":1096},[25,4810,4811],{},"  const trim = () => {\n",[25,4813,4814],{"class":27,"line":1102},[25,4815,4816],{},"    const url = padRef.current?.getTrimmedCanvas().toDataURL(\"image/png\");\n",[25,4818,4819],{"class":27,"line":1108},[25,4820,4821],{},"    if (url) {\n",[25,4823,4824],{"class":27,"line":1113},[25,4825,4826],{},"      setTrimmedDataURL(url);\n",[25,4828,4829],{"class":27,"line":1119},[25,4830,32],{"emptyLinePlaceholder":31},[25,4832,4833],{"class":27,"line":1125},[25,4834,4835],{},"      // どこかへ保存する\n",[25,4837,4838],{"class":27,"line":1131},[25,4839,1526],{},[25,4841,4842],{"class":27,"line":1137},[25,4843,2650],{},[25,4845,4846],{"class":27,"line":1143},[25,4847,32],{"emptyLinePlaceholder":31},[25,4849,4850],{"class":27,"line":1149},[25,4851,4852],{},"  useEffect(() => {\n",[25,4854,4855],{"class":27,"line":1154},[25,4856,4857],{},"    /**\n",[25,4859,4860],{"class":27,"line":1160},[25,4861,4862],{},"     *初期実行\n",[25,4864,4865],{"class":27,"line":1166},[25,4866,4867],{},"     *\n",[25,4869,4870],{"class":27,"line":1172},[25,4871,4872],{},"     */\n",[25,4874,4875],{"class":27,"line":1177},[25,4876,4877],{},"    const init = async () => {\n",[25,4879,4880],{"class":27,"line":1183},[25,4881,32],{"emptyLinePlaceholder":31},[25,4883,4884],{"class":27,"line":3174},[25,4885,4886],{},"                const url = \"ここで保存先から取得\"\n",[25,4888,4889],{"class":27,"line":3179},[25,4890,4891],{},"          \n",[25,4893,4894],{"class":27,"line":3184},[25,4895,4896],{},"          // fromDataURLでSignatureCanvasに\n",[25,4898,4899],{"class":27,"line":3189},[25,4900,4901],{},"          // 保存したデータURL取り込むきちんと幅と高さを合わせないと画像が小さくなったりする\n",[25,4903,4904],{"class":27,"line":3194},[25,4905,4906],{},"        padRef.current?.fromDataURL(url, {\n",[25,4908,4909],{"class":27,"line":3199},[25,4910,4911],{},"          width: 800,\n",[25,4913,4914],{"class":27,"line":3204},[25,4915,4916],{},"          height: 200\n",[25,4918,4919],{"class":27,"line":3209},[25,4920,4921],{},"        });\n",[25,4923,4924],{"class":27,"line":3214},[25,4925,4926],{},"        setTrimmedDataURL(url);\n",[25,4928,4929],{"class":27,"line":3219},[25,4930,2503],{},[25,4932,4933],{"class":27,"line":3224},[25,4934,4935],{},"    };\n",[25,4937,4938],{"class":27,"line":3229},[25,4939,32],{"emptyLinePlaceholder":31},[25,4941,4942],{"class":27,"line":3234},[25,4943,4944],{},"    init();\n",[25,4946,4947],{"class":27,"line":3239},[25,4948,4949],{},"  }, []);\n",[25,4951,4952],{"class":27,"line":3244},[25,4953,32],{"emptyLinePlaceholder":31},[25,4955,4956],{"class":27,"line":3249},[25,4957,32],{"emptyLinePlaceholder":31},[25,4959,4960],{"class":27,"line":3254},[25,4961,4962],{},"  return (\n",[25,4964,4965],{"class":27,"line":3259},[25,4966,4967],{},"    \u003C>\n",[25,4969,4970],{"class":27,"line":3264},[25,4971,4972],{},"      \u003CSignatureCanvas\n",[25,4974,4975],{"class":27,"line":3269},[25,4976,4977],{},"        penColor=\"white\"\n",[25,4979,4980],{"class":27,"line":3274},[25,4981,4982],{},"        backgroundColor=\"gray\"\n",[25,4984,4985],{"class":27,"line":3279},[25,4986,4987],{},"        canvasProps={{ width: 800, height: 200 }}\n",[25,4989,4990],{"class":27,"line":3284},[25,4991,4992],{},"        ref={padRef}\n",[25,4994,4995],{"class":27,"line":3289},[25,4996,4997],{},"      />\n",[25,4999,5000],{"class":27,"line":3294},[25,5001,5002],{},"      \u003Cdiv>\n",[25,5004,5005],{"class":27,"line":3299},[25,5006,5007],{},"        {trimmedDataURL ? (\n",[25,5009,5010],{"class":27,"line":3304},[25,5011,5012],{},"          \u003Cimg alt=\"signature\" src={trimmedDataURL} width={80} height={20} />\n",[25,5014,5015],{"class":27,"line":3310},[25,5016,5017],{},"        ) : null}\n",[25,5019,5020],{"class":27,"line":3316},[25,5021,5022],{},"      \u003C/div>Ï\n",[25,5024,5025],{"class":27,"line":3321},[25,5026,5027],{},"          \u003CButton onClick={() => clear()} >\n",[25,5029,5030],{"class":27,"line":3326},[25,5031,5032],{},"            clear\n",[25,5034,5035],{"class":27,"line":3331},[25,5036,5037],{},"          \u003C/Button>\n",[25,5039,5040],{"class":27,"line":3336},[25,5041,5042],{},"          \u003CButton onClick={() => trim()} >\n",[25,5044,5045],{"class":27,"line":3341},[25,5046,5047],{},"               trim\n",[25,5049,5050],{"class":27,"line":3346},[25,5051,5037],{},[25,5053,5054],{"class":27,"line":3351},[25,5055,32],{"emptyLinePlaceholder":31},[25,5057,5058],{"class":27,"line":3356},[25,5059,5060],{},"    \u003C/>\n",[25,5062,5063],{"class":27,"line":3361},[25,5064,2576],{},[25,5066,5067],{"class":27,"line":3366},[25,5068,2342],{},[238,5070,2215],{},[238,5072,5073],{},[1544,5074,5077],{"href":5075,"rel":5076},"https://www.npmjs.com/package/react-signature-canvas",[1548],"react-signature-canvas - npm",[238,5079,5080],{},[1544,5081,5084],{"href":5082,"rel":5083},"https://github.com/agilgur5/react-signature-canvas",[1548],"agilgur5/react-signature-canvas: A React wrapper component around signature_pad (in \u003C 150 LoC). Unopinionated and heavily updated fork of react-signature-pad",[208,5086,210],{},{"title":20,"searchDepth":35,"depth":35,"links":5088},[5089],{"id":4619,"depth":35,"text":4619,"children":5090},[5091,5092],{"id":4627,"depth":41,"text":4628},{"id":4645,"depth":41,"text":4645},[5094],"React","Reactで手書きサイン機能を実装できるreact-signature-canvasを試し、実装時にハマった点をまとめた",{},"/posts/try-react-signature-canvas",{"title":4614,"description":5095},"posts/try-react-signature-canvas",[1443,1451,5094,5101],"Next.js","YwGSqRcXCDY7qRW5MqFK0ePKhXsCTVT3lSYN5KDYd1I",[5104,5106,5110,5112,5116,5120,5124,5128,5132,5134,5138,5140,5144,5148,5150,5153,5157,5161,5165,5169,5173,5177,5179,5183,5187,5190,5193,5196,5200,5202,5206,5209,5213,5217,5220,5224,5227,5231,5235,5238,5242,5246,5250,5253,5257,5261,5265,5269,5273,5277,5281,5285,5288,5292,5296,5300,5303,5305,5308,5312],{"id":220,"title":6,"titles":5105,"content":217,"level":28},[],{"id":5107,"title":13,"titles":5108,"content":5109,"level":35},"/posts/1064#操作",[6],"const  arr = []\n\n// 先頭を削除\narr.shift() ;\n\n// 末尾を削除\narr.pop() ;\n\n// 配列合計\ndata.reduce((a, x) =>{return a + ((x || 0) - 0);}, 0);\n\n// 配列から新しい配列\nconst count = Array.from(line)\n\n// 配列を空,null undefined を削除\narr.filter((v) => v\n// 配列の要素すべてが条件を満たしているか\n  o = s.every(isUpperCase)\n//配列の要素一つでも条件を満たしているか\narr.some()\n//配列のkeyを取得\narr_key = Object.keys(arr)\n// 配列に引数の値が含まれているかどうか\narr_key.includes(x)\n//配列の順番を逆に\narr.reverse()\n\n// 配列の重複削除\nconst array1 = [1, 5, 3, 1, 5, 3];\nconst array2 = Array.from(new Set(array1)) html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":555,"title":230,"titles":5111,"content":553,"level":28},[],{"id":5113,"title":236,"titles":5114,"content":5115,"level":35},"/posts/2024-review#_13月",[230],"例年ながら、冬は寒いし日光なくてあんまり調子は出ないで 今年もローテンションで生活していました.. とはいえ りんご農園さんの受注分析システムを作成したり はじめて冬の戸隠神社に仲良くなったオーストラリア人でワーキングホリデーで日本に来た友達と 雪の中行ってみたりしました。",{"id":5117,"title":281,"titles":5118,"content":5119,"level":35},"/posts/2024-review#_46月",[230],"4月5月で東京でSIerの新人研修のサブ講師をしたのは新しい経験でした。 今まで子供にプログラミングを教えたりとか、 オンラインのプログラミング教室の講師の経験をしてきましたが やはり対面でメイン講師ではないとはいえ100名以上を前に喋ったり サポートするのは今までとはちがった経験で仕事を受けた時は意識していませんでしたが チャレンジであり新しい価値観とスキルを身につけた気がします。 また、登山もことしも行き始め 見晴岳・三方ヶ峰・篭ノ登山(東篭ノ登山)飯綱山蓼科山 に行きましたー。 ものすごい高い山ではないですが、 山頂でお湯を沸かしてカップラーメンとコーヒーは達成感あっていいものですね〜 帰りに、温泉に寄ってくるのも定番です！ そして、今年の大きな旅行１つ目 台湾にも１人旅をしてきました。 今まで海外は誰かと一緒でしたので今回 全ての手配も一人でやり一人で台湾に行って帰ってきたのは 旅行の楽しさも凄くありましたが、 より色々なとこにフットワーク軽く移動できるようになった気がして嬉しかったです。 それから台湾は英語あまり通じなかったですが、同じホステルの人とかと頑張って喋ってみて 前よりも英語も上達している気がしたのも嬉しかったです。",{"id":5121,"title":373,"titles":5122,"content":5123,"level":35},"/posts/2024-review#_79月",[230],"暑すぎてあまり引きこもり気味でした… それでも 松本の花火や穂高神社の花火に行ったりしました。 そして今年の大きな旅行２つ目 青春18きっぷで北海道まで行ったことです。 青春18きっぷが今年で無くなるのではないかとの噂を聞いて 今まで１回もチャレンジしたことなかったので 長野からどこまで行けるか調べてチャレンジしてみました。 フェリーに乗る必要があるとはいえ函館まで行きさらに札幌までいってきました！ じつはこのルート青春18きっぷの改訂でこの冬からは同じ手段ではいけなくなっていまいました。 ちゃんと夏のシーズンにいってよかったな思いました。 山にも登りました、 9月の少し涼しくなってきたタイミングで 烏帽子岳と湯ノ丸山にいってきましたー",{"id":5125,"title":437,"titles":5126,"content":5127,"level":35},"/posts/2024-review#_1012月",[230],"前半登山とキャンプ 根子岳と四阿山にいってきました。 キャンプは子安温泉キャンプ所で！ 今回一緒に行ったメンバーが焚き火台を持ってきてくれて 初めてキャンプで焚き火を焚き火で魚や肉を焼いたりして 炎を眺めるのもいいですし、焚き火で作った料理は美味しいしで 僕も焚き火台が欲しくなりました… そして今年３つ目の大きな旅行で 出雲へいってきました 東京からサンライズ出雲の寝台列車に乗ることができて嬉しかったです！ 日本で唯一毎日運行されている寝台特急ということで 乗れるうちに乗ってみたかったのですが、今回その目標も叶いました〜 出雲で出雲大社と周辺の神社、それから松江で宿泊し、松江城や歴史館 そして世界遺産の石見銀山の構成遺産の温泉津に泊まって 翌日石見銀山へ なかなか関西より西に行くことが少ないので色々回れておもしろかったし、 歴史も垣間見れる場所もいけてよかったです。",{"id":5129,"title":518,"titles":5130,"content":5131,"level":35},"/posts/2024-review#まとめ",[230],"今年は結構旅行など意外に外出が多かった年でした〜 仕事ではフリーランスになって１年目で変化が多かったですが りんご農園さんのDX支援は講師をしてみたりで新たな自分の可能性を広げられたかなと思ってます。 あと、地味に夏からダイエットをしてるのです、12月末で7kg痩せていて 自分でもびっくりですが結構嬉しいです！ あと2kg痩せてそこから筋肉つけれる方向に向かっていければなって考えてますね〜 来年の目標は年始にまた考えますが、もうちょい痩せて、もうちょい英語喋れるようになるのは 頑張っていきたいところですね〜",{"id":769,"title":564,"titles":5133,"content":767,"level":28},[],{"id":5135,"title":569,"titles":5136,"content":5137,"level":35},"/posts/4456#データ取得コレクション全部",[564],"firebase.initializeApp(firebaseConfig)\n\nconst firestore = firebase.firestore()\n\nconst querySnapshot = await firestore.collection('p0st')\n\n// firebase.firestore.QuerySnapshotのインスタンスを取得\nconsole.log(querySnapshot.size)\nconsole.log(querySnapshot.empty)\nconsole.log(querySnapshot.docs.map((postDoc) => postDoc.id))\nquerySnapshot.forEach((postDoc) => {\n  console.log([postDoc.id, JSON.stringify(postDoc.data())])\n}) html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":873,"title":776,"titles":5139,"content":871,"level":28},[],{"id":5141,"title":781,"titles":5142,"content":5143,"level":35},"/posts/4621#月の差分",[776],"何月前か後ろかを整数で返す //  js月の比較\nconst date1 = new Date(2021, 1, 1)\nconst date2 = new Date(2021, 12, 11)\n\nlet months\nmonths = (date2.getFullYear() - date1.getFullYear()) * 12\nmonths -= date1.getMonth() + 1\nmonths += date2.getMonth() + 1",{"id":5145,"title":831,"titles":5146,"content":5147,"level":35},"/posts/4621#日の差分",[776],"単純に日数の差分を返す //  js日差分\nconst date1 = new Date(2021, 1, 1)\nconst date2 = new Date(2021, 12, 11)\nconst termDay = (date2 - date1) / 86400000\nconsole.log(termDay) html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":1447,"title":880,"titles":5149,"content":1445,"level":28},[],{"id":5151,"title":887,"titles":5152,"content":20,"level":28},"/posts/gas-checkrakutenpayemailsandlogdaily#gmailを自動解析楽天payと楽天キャッシュの利用情報をスプレッドシートに記録するスクリプト",[],{"id":5154,"title":890,"titles":5155,"content":5156,"level":35},"/posts/gas-checkrakutenpayemailsandlogdaily#はじめに",[887],"日々の支出管理やキャッシュフローの可視化は大切ですよね？ 僕は基本的に支払いは電子決済で済ませてるので大体の履歴はマネーフォワードに連携して そこで見ているですが、実は楽天pay,PayPay,ANApayなどは連携していなく アプリでしかみることができないので今回\n「楽天Pay」や「楽天キャッシュ」の利用履歴を自動で取得して、スプレッドシートに保存してBIで見れたら便利だと思いやってみました\n今回は Google Apps Script (GAS) を使って、Gmailから自動で利用情報を取得し、Googleスプレッドシートに記録するスクリプトを作成します。 また、基本的に楽天payの支払いを楽天キャッシュからしているので支払いとチャージ料方法を取得するコードもつくりました。",{"id":5158,"title":917,"titles":5159,"content":5160,"level":35},"/posts/gas-checkrakutenpayemailsandlogdaily#_1-楽天pay版スクリプト",[887],"Gmailの「楽天Payアプリご利用内容確認メール」を解析。利用日時、店舗名、伝票番号、決済総額などを抽出。データをGoogleスプレッドシートに自動で記録。 function checkRakutenPayEmailsAndLogDaily() {\n  const sheetId = \"YOUR_SPREADSHEET_ID\"; // スプレッドシートIDを指定\n  const sheetName = \"楽天Payログ\"; // シート名を指定\n\n  const today = new Date();\n  today.setHours(0, 0, 0, 0);\n  const yesterday = new Date(today);\n  yesterday.setDate(today.getDate() - 1);\n  const startDate = Utilities.formatDate(yesterday, Session.getScriptTimeZone(), \"yyyy/MM/dd\");\n  const endDate = Utilities.formatDate(today, Session.getScriptTimeZone(), \"yyyy/MM/dd\");\n\n  const searchQuery = `from:no-reply@pay.rakuten.co.jp subject:\"楽天ペイアプリご利用内容確認メール\" after:${startDate} before:${endDate}`;\n  const sheet = SpreadsheetApp.openById(sheetId).getSheetByName(sheetName);\n  if (!sheet) throw new Error(`シート \"${sheetName}\" が見つかりません`);\n\n  const threads = GmailApp.search(searchQuery);\n  if (threads.length === 0) {\n    console.log(\"前日分の対象メールはありません。\");\n    return;\n  }\n\n  threads.forEach(thread => {\n    const messages = thread.getMessages();\n    messages.forEach(message => {\n      const body = message.getPlainBody();\n      let date, receiptNumber, store, totalAmount, points, paymentMethod;\n\n      const dateMatch = body.match(/ご利用日時\\s+([\\d/]+\\(.\\)\\s+[\\d:]+)/);\n      const receiptMatch = body.match(/伝票番号\\s+([A-Z0-9-]+)/);\n      const storeMatch = body.match(/ご利用店舗\\s+(.+)/);\n      const totalAmountMatch = body.match(/決済総額\\s+¥([\\d,]+)/);\n      const pointsMatch = body.match(/ポイント\\s+([\\d,]+)/);\n      const paymentMatch = body.match(/お取引内容\\s+(.+)/);\n\n      date = dateMatch ? dateMatch[1] : \"不明\";\n      receiptNumber = receiptMatch ? receiptMatch[1] : \"不明\";\n      store = storeMatch ? storeMatch[1].trim() : \"不明\";\n      totalAmount = totalAmountMatch ? totalAmountMatch[1].replace(/,/g, '') : \"0\";\n      points = pointsMatch ? pointsMatch[1] : \"0\";\n      paymentMethod = paymentMatch ? paymentMatch[1].trim() : \"不明\";\n\n      sheet.appendRow([new Date(), date, receiptNumber, store, `¥${totalAmount}`, points, paymentMethod]);\n    });\n  });\n\n  console.log(\"前日分の楽天ペイのメール内容をスプレッドシートに記録しました。\");\n}",{"id":5162,"title":1192,"titles":5163,"content":5164,"level":35},"/posts/gas-checkrakutenpayemailsandlogdaily#_2-楽天キャッシュ版スクリプト",[887],"Gmailの「楽天キャッシュチャージ完了メール」を解析。取引日時、チャージ内容、金額を抽出。データをGoogleスプレッドシートに自動で記録。",{"id":5166,"title":1206,"titles":5167,"content":5168,"level":41},"/posts/gas-checkrakutenpayemailsandlogdaily#スクリプトコード",[887,1192],"function checkRakutenCashEmailsAndLogDaily() {\n  const sheetId = \"YOUR_SPREADSHEET_ID\"; // スプレッドシートIDを指定\n  const sheetName = \"楽天キャッシュログ\"; // シート名を指定\n\n  const today = new Date();\n  today.setHours(0, 0, 0, 0);\n  const yesterday = new Date(today);\n  yesterday.setDate(today.getDate() - 1);\n  const startDate = Utilities.formatDate(yesterday, Session.getScriptTimeZone(), \"yyyy/MM/dd\");\n  const endDate = Utilities.formatDate(today, Session.getScriptTimeZone(), \"yyyy/MM/dd\");\n\n  const searchQuery = `from:pointcharge@edy.rakuten.co.jp subject:\"【楽天キャッシュ】チャージ完了のお知らせ\" after:${startDate} before:${endDate}`;\n  const sheet = SpreadsheetApp.openById(sheetId).getSheetByName(sheetName);\n  if (!sheet) throw new Error(`シート \"${sheetName}\" が見つかりません`);\n\n  const threads = GmailApp.search(searchQuery);\n  if (threads.length === 0) {\n    console.log(\"前日分の対象メールはありません。\");\n    return;\n  }\n\n  threads.forEach(thread => {\n    const messages = thread.getMessages();\n    messages.forEach(message => {\n      const body = message.getPlainBody();\n      let transactionDate, content, amount;\n\n      const dateMatch = body.match(/\\[取引日時\\]\\s+([\\d/]+\\s+[\\d:]+)/);\n      const contentMatch = body.match(/\\[内容\\]\\s+(.+)/);\n      const amountMatch = body.match(/\\[金額\\]\\s+([\\d,]+)円/);\n\n      transactionDate = dateMatch ? dateMatch[1] : \"不明\";\n      content = contentMatch ? contentMatch[1].trim() : \"不明\";\n      amount = amountMatch ? amountMatch[1].replace(/,/g, '') : \"0\";\n\n      sheet.appendRow([new Date(), transactionDate, content, `¥${amount}`]);\n    });\n  });\n\n  console.log(\"前日分の楽天キャッシュのメール内容をスプレッドシートに記録しました。\");\n}",{"id":5170,"title":1393,"titles":5171,"content":5172,"level":35},"/posts/gas-checkrakutenpayemailsandlogdaily#_3-トリガー設定",[887],"どちらのスクリプトも毎日自動実行するには、Google Apps Script の トリガー機能 を活用します。 スクリプトエディタを開き、時計マーク（トリガー設定）をクリック。「トリガーを追加」を選択。必要なスクリプト関数（例: checkRakutenPayEmailsAndLogDaily）を選択。実行タイミングを「日付ベース」「午前1時」などに設定。",{"id":5174,"title":1424,"titles":5175,"content":5176,"level":35},"/posts/gas-checkrakutenpayemailsandlogdaily#終わりに",[887],"これで、毎日の支出やチャージ状況を取得できそうです。 これを元にBIなどでみるかもしくはマネーフォワードに自動的にスクレイピングのライブラリを使って登録するのもいいかもしれません。 html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":1586,"title":1456,"titles":5178,"content":1584,"level":28},[],{"id":5180,"title":1461,"titles":5181,"content":5182,"level":41},"/posts/gas-cloud-function-auth#経緯",[1456],"Google App Scriptだけでは外部ライブラリを使ったりnpmを使ったりするのが難しいの Cloud Functions で処理してデータを返してもらって作ろうと思った時の認証について ひとまず簡易なやり方で",{"id":5184,"title":1473,"titles":5185,"content":5186,"level":35},"/posts/gas-cloud-function-auth#結論",[1456],"GCPでOAuth 同意画面を作成Google App Script側をOAuth 同意画面作ったGCPプロジェクト作成appscript.jsonの編集してOAuthスコープの設定 あと下記のようなコードで認証できる function myFunction() {\n  const url = \"https://xxxxxx.cloudfunctions.net/xxxxx\"\n  const res = UrlFetchApp.fetch(url, {\n    headers: {\n      Authorization: `Bearer ${ScriptApp.getIdentityToken()}`\n    }\n  })\n  console.log(res.getContentText()) // Fnctiionの結果\n} GAS（GoogleAppsScript）から認証付きのCloud Functionsをサービスアカウントを使用して呼び出す #GoogleCloud - QiitaGASから認証付きのCloud Functionsを実行する。 #GoogleCloud - Qiita Google Apps Script (GAS) から Cloud Functions に認証付きでアクセスする – kkuchima memo Google Apps Script で書かれたアドオンのバックエンドを Cloud Run に移行した話 - Link and Motivation Developers' Blog GAS + CloudFunctionsでVisionAPIの処理結果をスプレッドシートに出力する #GoogleAppsScript - Qiita html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":1772,"title":1595,"titles":5188,"content":5189,"level":28},[],"Google Apps ScriptでGoogle Driveフォルダ内のCSVファイルをまとめて読み込み、スプレッドシートに書き込むコード function importData() {\n\n  // 対象フォルダを指定\n  const ss = SpreadsheetApp.getActiveSpreadsheet();\n  const sheet = ss.getSheetByName(\"data\"); //シート名\n  const folder = DriveApp.getFolderById('xxxxx'); //フォルダパスを指定\n\n\n\n  sheet.getRange(2, 1, sheet.getLastRow(), sheet.getLastColumn()).clear()\n\n  const files = folder.getFiles();\n  let sortFiles = []\n  while (files.hasNext()) {\n    sortFiles.push(files.next());\n  }\n  sortFiles.sort(function (a, b) { if (a.getName() > b.getName()) { return 1 } else { return -1 } })\n\n\n  let allSetData = []\n  for (const iterator of sortFiles) {\n    const file = iterator;\n    // 取込処理\n    const data = file.getBlob().getDataAsString(\"UTF-8\");\n    const csv = Utilities.parseCsv(data);\n    const setData = csv\n    setData.shift()\n    setData.reverse()\n    const lastRow = sheet.getLastRow();\n    Logger.log(setData)\n\n    allSetData = [...allSetData, ...setData]\n    // CSV書込\n    if (setData.length > 0) sheet.getRange(lastRow + 1, 1, setData.length, setData[0].length).setValues(setData); html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":1970,"title":1779,"titles":5191,"content":5192,"level":28},[],"Google Apps Scriptでオブジェクトから生成したCSVを、同名ファイルの重複を避けつつGoogle Driveへ保存するコード const sample = { id:1 ,name:\"aa\"} // サンプル実際のデータに直して\n\nconst fileName = \"test.csv\"\n\n\n\nconst blob = createBlob(csv, fileName)\n\ndeleteAndWriteDrive(blob, folderId, fileName)\n\nfunction deleteAndWriteDrive(csvBlob, folderId,fileName) {\n  const drive = DriveApp.getFolderById(folderId);\n  const files = drive.getFiles();\n  let sortFiles = []\n  while (files.hasNext()) {\n    sortFiles.push(files.next());\n  }\n  sortFiles.sort(function (a, b) { if (a.getName() > b.getName()) { return 1 } else { return -1 } })\n\n  for (const iterator of sortFiles) {\n    const file = iterator;\n    if (file.getName() === fileName) {\n      hasFileName = file.getName()\n      console.log(`${hasFileName}フォルダが存在します。`)\n      file.setTrashed(true)\n      break\n    }\n  }\n  \n  drive.createFile(csvBlob);\n}\n\nfunction createBlob(csv, fileName) {\n  const contentType = 'text/csv';\n  const charset = 'utf-8';\n  const blob = Utilities.newBlob('', contentType, fileName).setDataFromString(csv, charset);\n  return blob;\n} html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":2238,"title":1977,"titles":5194,"content":5195,"level":28},[],"JavaScriptで配列内の要素ごとの出現回数を数え、最も多く出現する回数を求めるコードのメモ const array = [1, 1, 1, 2, 2, 3];\n\nconst map = array.reduce(\n  (acc, curr) => acc.set(curr, (acc.get(curr) || 0) + 1),\n  new Map()\n);\n\nconsole.log([...map.keys()]); // [1, 2, 3]\nconsole.log([...map.values()]); // [3, 2, 1]\nconsole.log([...map.entries()]); // [[1, 3], [2, 2], [3, 1]]\n\nconst arrayCountMax = Math.max(...map.values()) //3",{"id":5197,"title":2215,"titles":5198,"content":5199,"level":41},"/posts/js-array-count-max#参考",[1977],"https://qiita.com/saka212/items/408bb17dddefc09004c8 https://pote-chil.com/blog/count-duplicate-array-item html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":4463,"title":2245,"titles":5201,"content":4461,"level":28},[],{"id":5203,"title":890,"titles":5204,"content":5205,"level":35},"/posts/notion-to-google-calender-1103#はじめに",[2245],"NotionのタスクをGoogleカレンダーと自動で同期させるシステムの実装方法を紹介します。このシステムにより、Notionで管理しているタスクの期限日を自動的にGoogleカレンダーに反映させることができます。ただしGoogleカレンダーの変更をNotionに反映することは想定していません。 また、完了したタスクはGoogleカレンダータスクを同期しているカレンダーとは別のカレンダに移動させるようにしています。",{"id":5207,"title":2258,"titles":5208,"content":20,"level":35},"/posts/notion-to-google-calender-1103#システムの概要",[2245],{"id":5210,"title":2261,"titles":5211,"content":5212,"level":41},"/posts/notion-to-google-calender-1103#主な機能",[2245,2258],"Notionの新規タスクを自動的にGoogleカレンダーに追加タスクの更新（タイトル、期限）をカレンダーに反映完了したタスクのカレンダーイベントを自動削除定期的に同期",{"id":5214,"title":2278,"titles":5215,"content":5216,"level":41},"/posts/notion-to-google-calender-1103#必要な準備",[2245,2258],"Notion API キーNotionデータベースの設定GoogleカレンダーGoogle Apps Script環境",{"id":5218,"title":2295,"titles":5219,"content":20,"level":35},"/posts/notion-to-google-calender-1103#実装方法",[2245],{"id":5221,"title":2299,"titles":5222,"content":5223,"level":41},"/posts/notion-to-google-calender-1103#_1-設定",[2245,2295],"必要な認証情報とIDを設定します： const CONFIG = {\n  NOTION_API_KEY: 'your-notion-api-key',\n  NOTION_DATABASE_ID: 'your-database-id',\n  CALENDAR_ID: 'your-calendar-id@group.calendar.google.com',\n  DONE_CALENDAR_ID: 'your-calendar-id@group.calendar.google.com',\n  NOTION_VERSION: '2022-06-28'\n};",{"id":5225,"title":2346,"titles":5226,"content":20,"level":41},"/posts/notion-to-google-calender-1103#_2-notionとの連携",[2245,2295],{"id":5228,"title":2349,"titles":5229,"content":5230,"level":41},"/posts/notion-to-google-calender-1103#タスク取得",[2245,2295],"// Notionからタスク一覧を取得\nfunction getNotionTasks() {\n  const url = `https://api.notion.com/v1/databases/${CONFIG.NOTION_DATABASE_ID}/query`;\n  const response = UrlFetchApp.fetch(url, {\n    method: 'POST',\n    headers: NOTION_HEADERS,\n    payload: JSON.stringify({\n      sorts: [\n        {\n          property: 'DueDate', // 日付プロパティ名\n          direction: 'descending' // 昇順にソート（降順の場合は'descending'に変更）\n        }\n      ],\n    })\n  });",{"id":5232,"title":2431,"titles":5233,"content":5234,"level":41},"/posts/notion-to-google-calender-1103#タスク更新",[2245,2295],"// Notionのタスクを更新（カレンダーイベントIDの保存）\nfunction updateNotionTask(taskId, calendarEventId) {\n  const url = `https://api.notion.com/v1/pages/${taskId}`;\n  return UrlFetchApp.fetch(url, {\n    method: 'PATCH',\n    headers: NOTION_HEADERS,\n    payload: JSON.stringify({\n      properties: {\n        'Calendar Event ID': {\n          rich_text: [{\n            text: { content: calendarEventId }\n          }]\n        }\n      }\n    })\n  });\n}",{"id":5236,"title":2519,"titles":5237,"content":20,"level":41},"/posts/notion-to-google-calender-1103#_3-googleカレンダーとの連携",[2245,2295],{"id":5239,"title":2522,"titles":5240,"content":5241,"level":41},"/posts/notion-to-google-calender-1103#イベント作成",[2245,2295],"function createCalendarEvent(task) {\n  const calendar = CalendarApp.getCalendarById(CONFIG.CALENDAR_ID);\n  const title = task.properties.Name.title[0].plain_text;\n  const dueDate = new Date(task.properties.DueDate.date.start);\n\n  const event = calendar.createAllDayEvent(\n    title,\n    dueDate,\n    { description: `Notion Task ID: ${task.id}\\\\nURL: ${task.url}` }\n  );\n\n  return event.getId();\n}",{"id":5243,"title":2593,"titles":5244,"content":5245,"level":41},"/posts/notion-to-google-calender-1103#_4-状態管理",[2245,2295],"タスクの状態を管理するための機能： // タスクの現在の状態を取得\nfunction getTaskState(task) {\n  return {\n    id: task.id,\n    title: task.properties.Name.title[0].plain_text,\n    dueDate: task.properties.DueDate.date?.start,\n    status: task.properties.Status.status ? task.properties.Status.status.name : \"None\",\n    calendarEventId: task.properties['Calendar Event ID']?.rich_text[0]?.text.content\n  };\n}",{"id":5247,"title":2658,"titles":5248,"content":5249,"level":41},"/posts/notion-to-google-calender-1103#_5-メイン同期処理",[2245,2295],"function syncNotionWithCalendar() {\n  try {\n    const tasks = getNotionTasks();\n    const previousState = getPreviousState();\n    const currentState = {};\n\n    tasks.forEach(task => {\n      currentState[task.id] = getTaskState(task);\n    });\n\n    tasks.forEach(task => {\n      processTaskChanges(task, previousState, currentState);\n    });\n\n    processDeletedTasks(previousState, currentState);\n    savePreviousState(currentState);\n\n  } catch (error) {\n    logError(error, 'メイン同期処理');\n  }\n}",{"id":5251,"title":2762,"titles":5252,"content":20,"level":35},"/posts/notion-to-google-calender-1103#実装のポイント",[2245],{"id":5254,"title":2766,"titles":5255,"content":5256,"level":41},"/posts/notion-to-google-calender-1103#_1-エラーハンドリング",[2245,2762],"各処理でtry-catchを使用エラーログの記録コンテキスト情報の保持",{"id":5258,"title":2781,"titles":5259,"content":5260,"level":41},"/posts/notion-to-google-calender-1103#_2-キャッシュの活用",[2245,2762],"前回の状態をキャッシュに保存6時間のキャッシュ有効期限差分検出による効率的な更新",{"id":5262,"title":2796,"titles":5263,"content":5264,"level":41},"/posts/notion-to-google-calender-1103#_3-定期実行の設定",[2245,2762],"// 定期実行トリガーの設定\nfunction setUpTrigger() {\n  // 既存のトリガーを削除\n  ScriptApp.getProjectTriggers().forEach(trigger => {\n    ScriptApp.deleteTrigger(trigger);\n  });\n\n  // 新しいトリガーを作成（1時間ごとに実行）\n  ScriptApp.newTrigger('syncNotionWithCalendar')\n    .timeBased()\n    .everyHours(1)\n    .create();\n}",{"id":5266,"title":2286,"titles":5267,"content":5268,"level":35},"/posts/notion-to-google-calender-1103#notionデータベースの設定",[2245],"きちんとtextかstatusか日付か合わせる 必要な項目： Name（タイトル）DueDate（期限日）Status（ステータス）Calendar Event ID（カレンダー連携用）",{"id":5270,"title":2889,"titles":5271,"content":5272,"level":35},"/posts/notion-to-google-calender-1103#セットアップ手順",[2245],"Google Apps Scriptプロジェクトの作成Notion APIキーの取得\nNotion APIキーは Notion Developer から取得できます。Notionデータベースの準備\n同期したいデータベースのURLから、IDを取得します。GoogleカレンダーIDを確認する。\nメインカレンダーの場合はprimary、他のカレンダーの場合はカレンダー設定画面でIDを確認してください。コードの貼り付けと設定トリガーの設定\nsetUpTriggerの実行 自分の頻度に合わせて権限の設定初回実行時にGoogleカレンダーへのアクセス権限を求められますので、許可します。 // API キーやIDを管理する設定オブジェクト\nconst CONFIG = {\n  NOTION_API_KEY: 'your-notion-api-key',\n  NOTION_DATABASE_ID: 'your-database-id',\n  CALENDAR_ID: 'your-calendar-id@group.calendar.google.com',\n  DONE_CALENDAR_ID: 'your-calendar-id@group.calendar.google.com',\n  NOTION_VERSION: '2022-06-28'\n};\n\n// Notionの共通ヘッダー設定\nconst NOTION_HEADERS = {\n  'Authorization': `Bearer ${CONFIG.NOTION_API_KEY}`,\n  'Notion-Version': CONFIG.NOTION_VERSION,\n  'Content-Type': 'application/json'\n};\n\n\n\n\n\n// メイン同期処理\nfunction syncNotionWithCalendar() {\n  try {\n    // タスク一覧の取得\n    const tasks = getNotionTasks();\n    const previousState = getPreviousState();\n    const currentState = {};\n\n    // 現在の状態を構築\n    console.log(\"現在の状態を構築\")\n    tasks.forEach(task => {\n\n      currentState[task.id] = getTaskState(task);\n    });\n\n    console.log(\"タスクの変更を処理\")\n    // タスクの変更を処理\n    tasks.forEach(task => {\n      console.log(\"currentState\", currentState[task.id])\n      console.log(\"previousState\", previousState[task.id])\n      processTaskChanges(task, previousState, currentState);\n    });\n\n    // 削除されたタスクを処理\n    console.log(\"削除されたタスクを処理\")\n    processDeletedTasks(previousState, currentState);\n\n    // 現在の状態を保存\n    console.log(\"現在の状態を保存\")\n    savePreviousState(currentState);\n\n  } catch (error) {\n    logError(error, 'メイン同期処理');\n  }\n}\n\n\n\n\n// Notionからタスク一覧を取得\nfunction getNotionTasks() {\n  const url = `https://api.notion.com/v1/databases/${CONFIG.NOTION_DATABASE_ID}/query`;\n  const response = UrlFetchApp.fetch(url, {\n    method: 'POST',\n    headers: NOTION_HEADERS,\n    payload: JSON.stringify({\n      sorts: [\n        {\n          property: 'DueDate', // 日付プロパティ名\n          direction: 'descending' // 昇順にソート（降順の場合は'descending'に変更）\n        }\n      ],\n    })\n  });\n\n  console.log(\"next_cursor\", JSON.parse(response.getContentText()).next_cursor)\n  return JSON.parse(response.getContentText()).results;\n}\n\n// Notionのタスクを更新（カレンダーイベントIDの保存）\nfunction updateNotionTask(taskId, calendarEventId) {\n  const url = `https://api.notion.com/v1/pages/${taskId}`;\n  return UrlFetchApp.fetch(url, {\n    method: 'PATCH',\n    headers: NOTION_HEADERS,\n    payload: JSON.stringify({\n      properties: {\n        'Calendar Event ID': {\n          rich_text: [{\n            text: { content: calendarEventId }\n          }]\n        }\n      }\n    })\n  });\n}\n\n// カレンダーイベントの新規作成\nfunction createCalendarEvent(task, CALENDAR_ID) {\n  const calendar = CalendarApp.getCalendarById(CALENDAR_ID);\n  const title = task.properties.Name.title[0].plain_text;\n  const dueDate = new Date(task.properties.DueDate.date.start);\n\n  if (!dueDate) return\n\n  const event = calendar.createAllDayEvent(\n    title,\n    dueDate,\n    { description: `Notion Task ID: ${task.id}\\nURL: ${task.url}` }\n  );\n\n  console.log(event)\n  return event.getId();\n}\n\n// カレンダーイベントの更新\nfunction updateCalendarEvent(eventId, task) {\n  const calendar = CalendarApp.getCalendarById(CONFIG.CALENDAR_ID);\n  const event = calendar.getEventById(eventId);\n  if (!event) return;\n\n  const title = task.properties.Name.title[0].plain_text;\n  const dueDate = new Date(task.properties.DueDate.date.start);\n\n  event.setTitle(title);\n  event.setAllDayDate(dueDate);\n  event.setDescription(`Notion Task ID: ${task.id}\\nURL: ${task.url}`);\n}\n\n// カレンダーイベントの削除\nfunction deleteCalendarEvent(eventId) {\n  const calendar = CalendarApp.getCalendarById(CONFIG.CALENDAR_ID);\n\n  try {\n    const event = calendar.getEventById(eventId);\n    if (event) {\n      event.deleteEvent();\n      return true\n    }\n  } catch (e) {\n    console.error(\"削除されている\", e)\n    return false\n\n  }\n\n  return false\n}\n\n// タスクの現在の状態を取得\nfunction getTaskState(task) {\n  return {\n    id: task.id,\n    title: task.properties.Name.title[0].plain_text,\n    dueDate: task.properties.DueDate.date?.start,\n    status: task.properties.Status.status ? task.properties.Status.status.name : \"None\",\n    calendarEventId: task.properties['Calendar Event ID']?.rich_text[0]?.text.content\n  };\n}\n\n// キャッシュから前回の状態を取得\nfunction getPreviousState() {\n  const cache = CacheService.getScriptCache();\n  const data = cache.get('previousState');\n\n  console.log(JSON.parse(data))\n  return data ? JSON.parse(data) : {};\n}\n\n// 現在の状態をキャッシュに保存（6時間有効）\nfunction savePreviousState(state) {\n  const cache = CacheService.getScriptCache();\n  cache.put('previousState', JSON.stringify(state), 21600);\n}\n\n// タスクの変更を検出して必要な処理を実行\nfunction processTaskChanges(task, previousState, currentState) {\n  const taskId = task.id;\n  const prevTask = previousState[taskId];\n  const currentTask = currentState[taskId];\n\n  try {\n    if (!prevTask && task.properties.DueDate?.date?.start) {\n      // 新規タスクの処理\n      console.log(\"新規タスクの処理\")\n      const calendarEventId = createCalendarEvent(task, CONFIG.CALENDAR_ID);\n      updateNotionTask(taskId, calendarEventId);\n    } else if (prevTask && prevTask.dueDate) {\n      // 既存タスクの処理\n      console.log(\"既存タスクの処理\")\n      const calendarEventId = prevTask.calendarEventId;\n      if (currentTask.status === 'Deleted') {\n        // 削除されたタスクの処理\n        console.log(\"削除されたタスクの処理\")\n        deleteCalendarEvent(calendarEventId);\n\n      } else if (\n        prevTask.title !== currentTask.title ||\n        prevTask.dueDate !== currentTask.dueDate\n      ) {\n        // タスクが更新された場合の処理\n        console.log(\"タスクが更新された場合の処理\")\n        updateCalendarEvent(calendarEventId, task);\n      } else if (currentTask.status === 'Done') {\n        // ステータスが完了タスクの処理\n        console.log(\"ステータスが完了タスクの処理\")\n        const reslut = deleteCalendarEvent(calendarEventId);\n        console.log(\"ステータスが完了タスクの処理終了 google カレンダー削除 \",reslut)\n\n        // 削除がない場合終了\n        if (!reslut) return\n\n        console.log(\"別カレンダーに完了を作成\")\n        // 別カレンダーに完了を作成\n        createCalendarEvent(task, CONFIG.DONE_CALENDAR_ID);\n        updateNotionTask(taskId, \"done\");\n        console.log(\"別カレンダーに完了を作成終了\")\n      }\n    }\n  } catch (error) {\n    logError(error, `タスク処理エラー - TaskID: ${taskId}`);\n  }\n}\n\n// 削除されたタスクの処理\nfunction processDeletedTasks(previousState, currentState) {\n  Object.keys(previousState).forEach(taskId => {\n    if (!currentState[taskId]) {\n      const calendarEventId = previousState[taskId].calendarEventId;\n      if (calendarEventId) {\n        try {\n          deleteCalendarEvent(calendarEventId);\n        } catch (error) {\n          logError(error, `削除済みタスクの処理エラー - TaskID: ${taskId}`);\n        }\n      }\n    }\n  });\n}\n\n// エラーログの記録\nfunction logError(error, context = '') {\n  console.error(`同期エラー ${context}:`, error);\n  // 必要に応じて追加のエラーハンドリング（Slack通知やメール送信など）\n\n\n}\n\n// 特定のキャッシュキーを削除する関数\nfunction clearPreviousStateCache() {\n  const cache = CacheService.getScriptCache();\n  cache.remove('previousState');\n  console.log(\"キャッシュ 'previousState' を削除しました\");\n}\n\n// 定期実行トリガーの設定\nfunction setUpTrigger() {\n  // 既存のトリガーを削除\n  ScriptApp.getProjectTriggers().forEach(trigger => {\n    ScriptApp.deleteTrigger(trigger);\n  });\n\n  // 新しいトリガーを作成（1時間ごとに実行）\n  ScriptApp.newTrigger('syncNotionWithCalendar')\n    .timeBased()\n    .everyHours(1)\n    .create();\n}",{"id":5274,"title":4354,"titles":5275,"content":5276,"level":35},"/posts/notion-to-google-calender-1103#注意点",[2245],"APIキーの管理\n重要な認証情報は適切に管理プロジェクト設定での管理を推奨エラー処理\nネットワークエラーへの対応API制限の考慮→ noiton api (１回で100件のページしかとれない)とgasの制限に注意 (稼働時間、fetchのリクエスト回数など)データ整合性の確保→手動編集する場合はnotinのみ編集するパフォーマンス\n不要な API 呼び出しの削減キャッシュの活用適切な実行間隔の設定",{"id":5278,"title":518,"titles":5279,"content":5280,"level":35},"/posts/notion-to-google-calender-1103#まとめ",[2245],"このシステムにより、NotionとGoogleカレンダーの連携が自動化され、タスク管理がより効率的になります。実装方法は目的や好みに応じて選択できます。 エラー処理やパフォーマンスの最適化など、実運用時の考慮点も含めて実装することで、より安定した運用が可能になります。",{"id":5282,"title":4406,"titles":5283,"content":5284,"level":35},"/posts/notion-to-google-calender-1103#参考文献",[2245],"Notion API DocumentationGoogle Calendar API DocumentationGoogle Apps Script Documentation html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"id":4562,"title":4472,"titles":5286,"content":5287,"level":28},[],"@nuxt/contentでカテゴリー・タグ・関連記事・目次機能を備えた自分のブログを作った構成の紹介 自分のブログを下記の構成でつくってみました。 https://tori-dev.com/",{"id":5289,"title":4486,"titles":5290,"content":5291,"level":35},"/posts/nuxt-blog#機能",[4472],"@nuxt/contentを使用したブログ作成のメイン機能について説明します。以下の機能が含まれます。 カテゴリータグ関連記事目次 また、アイキャッチの自動生成は現在のところ実装されていませんが、今後のアップデートで追加予定です。",{"id":5293,"title":4509,"titles":5294,"content":5295,"level":35},"/posts/nuxt-blog#記事の作成方法",[4472],"ブログ記事の作成方法は以下のいずれかを選ぶことができます。 ローカルでダウンロードしてデプロイする方法\nNotionを使用する場合Markdownを使用する場合（Google Drive + Markdownツールなどを利用）microCMS（ヘッドレスCMS）を使用する方法 それぞれの方法によって、使いやすさや環境に合わせて選択できます。",{"id":5297,"title":4536,"titles":5298,"content":5299,"level":35},"/posts/nuxt-blog#デプロイ先",[4472],"作成したブログを公開するためのデプロイ先は、以下のオプションがあります。 Firebase HostingNetlify どちらのプラットフォームも高性能で信頼性があり、使いやすいインターフェースを提供しています。",{"id":4607,"title":4570,"titles":5301,"content":5302,"level":28},[],"NuxtのasyncData・created・mounted・computed・watchなどライフサイクルの挙動を整理したメモ asyncDataはssaのときはクライアントでssgのときはgenerate時にしかできない以下はクライアントで動く\ncreated：インスタンス初期化時、DOMが生成される前mounted：インスタンス初期化時、DOMが生成された後computed： 算出プロパティgetter,setterが使えるwatch：データの変化をトリガにしたフック",{"id":5097,"title":4614,"titles":5304,"content":5095,"level":28},[],{"id":5306,"title":4619,"titles":5307,"content":4624,"level":35},"/posts/try-react-signature-canvas#react-signature-canvas",[4614],{"id":5309,"title":4628,"titles":5310,"content":5311,"level":41},"/posts/try-react-signature-canvas#主な特徴",[4614,4619],"キャンバスベースのシンプルなサイン機能タッチデバイスとマウスの両方に対応サインのクリア、保存、読み込みなどの基本機能を提供カスタマイズ可能なスタイルとオプション",{"id":5313,"title":4645,"titles":5314,"content":5315,"level":41},"/posts/try-react-signature-canvas#やってみて",[4614,4619],"公式を見ながらやったら意外といけた useRefを使うのと保存したデータURLを取り込んだ時に画像が小さくなってしまうとこに少し困った。 import SignatureCanvas from \"react-signature-canvas\";\nimport { FC, useState, useRef, useEffect } from \"react\";\n\n\n\n\n/**\n * サイン\n *\n * @returns サイン\n */\nconst Signature: FC\u003CProps> = () => {\n\n\n  const [trimmedDataURL, setTrimmedDataURL] = useState\u003Cstring>(\"\");\n  const padRef = useRef\u003CSignatureCanvas>(null);\n\n\n  /* -------------------------------- Methods ------------------------------- */\n\n  /**\n   * サインクリア\n   *\n   */\n  const clear = () => {\n    padRef.current?.clear();\n  };\n\n  /**\n   *サインURlに変換保存\n   *\n   */\n  const trim = () => {\n    const url = padRef.current?.getTrimmedCanvas().toDataURL(\"image/png\");\n    if (url) {\n      setTrimmedDataURL(url);\n\n      // どこかへ保存する\n    }\n  };\n\n  useEffect(() => {\n    /**\n     *初期実行\n     *\n     */\n    const init = async () => {\n\n                const url = \"ここで保存先から取得\"\n          \n          // fromDataURLでSignatureCanvasに\n          // 保存したデータURL取り込むきちんと幅と高さを合わせないと画像が小さくなったりする\n        padRef.current?.fromDataURL(url, {\n          width: 800,\n          height: 200\n        });\n        setTrimmedDataURL(url);\n      }\n    };\n\n    init();\n  }, []);\n\n\n  return (\n    \u003C>\n      \u003CSignatureCanvas\n        penColor=\"white\"\n        backgroundColor=\"gray\"\n        canvasProps={{ width: 800, height: 200 }}\n        ref={padRef}\n      />\n      \u003Cdiv>\n        {trimmedDataURL ? (\n          \u003Cimg alt=\"signature\" src={trimmedDataURL} width={80} height={20} />\n        ) : null}\n      \u003C/div>Ï\n          \u003CButton onClick={() => clear()} >\n            clear\n          \u003C/Button>\n          \u003CButton onClick={() => trim()} >\n               trim\n          \u003C/Button>\n\n    \u003C/>\n  );\n}; 参考 react-signature-canvas - npm agilgur5/react-signature-canvas: A React wrapper component around signature_pad (in \u003C 150 LoC). Unopinionated and heavily updated fork of react-signature-pad html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",[5317,5459,5691,5843,5924,6380,6480,6631,6802,7016,8738,8807,8836],{"id":5,"title":6,"body":5318,"categories":5455,"cross_post":215,"date":216,"description":217,"extension":218,"image":20,"meta":5456,"navigation":31,"note_id":215,"note_url":215,"path":220,"private":221,"qiita_id":215,"qiita_url":215,"seo":5457,"stem":223,"tags":5458,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":227},{"type":8,"value":5319,"toc":5452},[5320,5322,5450],[11,5321,13],{"id":13},[15,5323,5324],{"className":17,"code":18,"language":19,"meta":20,"style":20},[22,5325,5326,5330,5334,5338,5342,5346,5350,5354,5358,5362,5366,5370,5374,5378,5382,5386,5390,5394,5398,5402,5406,5410,5414,5418,5422,5426,5430,5434,5438,5442,5446],{"__ignoreMap":20},[25,5327,5328],{"class":27,"line":28},[25,5329,32],{"emptyLinePlaceholder":31},[25,5331,5332],{"class":27,"line":35},[25,5333,38],{},[25,5335,5336],{"class":27,"line":41},[25,5337,32],{"emptyLinePlaceholder":31},[25,5339,5340],{"class":27,"line":46},[25,5341,49],{},[25,5343,5344],{"class":27,"line":52},[25,5345,55],{},[25,5347,5348],{"class":27,"line":58},[25,5349,32],{"emptyLinePlaceholder":31},[25,5351,5352],{"class":27,"line":63},[25,5353,66],{},[25,5355,5356],{"class":27,"line":69},[25,5357,72],{},[25,5359,5360],{"class":27,"line":75},[25,5361,32],{"emptyLinePlaceholder":31},[25,5363,5364],{"class":27,"line":80},[25,5365,83],{},[25,5367,5368],{"class":27,"line":86},[25,5369,89],{},[25,5371,5372],{"class":27,"line":92},[25,5373,32],{"emptyLinePlaceholder":31},[25,5375,5376],{"class":27,"line":97},[25,5377,100],{},[25,5379,5380],{"class":27,"line":103},[25,5381,106],{},[25,5383,5384],{"class":27,"line":109},[25,5385,32],{"emptyLinePlaceholder":31},[25,5387,5388],{"class":27,"line":114},[25,5389,117],{},[25,5391,5392],{"class":27,"line":120},[25,5393,123],{},[25,5395,5396],{"class":27,"line":126},[25,5397,129],{},[25,5399,5400],{"class":27,"line":132},[25,5401,135],{},[25,5403,5404],{"class":27,"line":138},[25,5405,141],{},[25,5407,5408],{"class":27,"line":144},[25,5409,147],{},[25,5411,5412],{"class":27,"line":150},[25,5413,153],{},[25,5415,5416],{"class":27,"line":156},[25,5417,159],{},[25,5419,5420],{"class":27,"line":162},[25,5421,165],{},[25,5423,5424],{"class":27,"line":168},[25,5425,171],{},[25,5427,5428],{"class":27,"line":174},[25,5429,177],{},[25,5431,5432],{"class":27,"line":180},[25,5433,183],{},[25,5435,5436],{"class":27,"line":186},[25,5437,32],{"emptyLinePlaceholder":31},[25,5439,5440],{"class":27,"line":191},[25,5441,194],{},[25,5443,5444],{"class":27,"line":197},[25,5445,200],{},[25,5447,5448],{"class":27,"line":203},[25,5449,206],{},[208,5451,210],{},{"title":20,"searchDepth":35,"depth":35,"links":5453},[5454],{"id":13,"depth":35,"text":13},[19],{},{"title":6,"description":217},[225,226],{"id":229,"title":230,"body":5460,"categories":5687,"cross_post":215,"date":552,"description":553,"extension":218,"image":20,"meta":5688,"navigation":31,"note_id":215,"note_url":215,"path":555,"private":221,"qiita_id":215,"qiita_url":215,"seo":5689,"stem":557,"tags":5690,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":561},{"type":8,"value":5461,"toc":5680},[5462,5464,5466,5468,5470,5472,5474,5476,5484,5492,5494,5496,5498,5500,5502,5504,5506,5508,5516,5518,5520,5522,5524,5532,5534,5536,5538,5540,5542,5544,5546,5548,5556,5558,5560,5562,5564,5566,5568,5570,5572,5574,5576,5578,5580,5588,5596,5598,5600,5602,5604,5606,5608,5610,5612,5614,5616,5618,5626,5628,5630,5632,5634,5636,5638,5640,5642,5644,5646,5654,5662,5664,5666,5668,5670,5672,5674,5676,5678],[11,5463,236],{"id":235},[238,5465,240],{},[238,5467,243],{},[238,5469,246],{},[238,5471,249],{},[238,5473,252],{},[238,5475,255],{},[238,5477,5478,5480,5482],{},[259,5479],{},[262,5481],{"src":264,"style":265,"frameBorder":266},[259,5483],{},[238,5485,5486,5488,5490],{},[259,5487],{},[262,5489],{"src":275,"style":265,"frameBorder":266},[259,5491],{},[11,5493,281],{"id":280},[238,5495,284],{},[238,5497,287],{},[238,5499,290],{},[238,5501,293],{},[238,5503,296],{},[238,5505,299],{},[238,5507,302],{},[304,5509,5510,5512,5514],{},[307,5511,309],{},[307,5513,312],{},[307,5515,315],{},[238,5517,318],{},[238,5519,321],{},[238,5521,324],{},[238,5523,327],{},[238,5525,5526,5528,5530],{},[259,5527],{},[262,5529],{"src":334,"style":265,"frameBorder":266},[259,5531],{},[238,5533,339],{},[238,5535,342],{},[238,5537,345],{},[238,5539,348],{},[238,5541,351],{},[238,5543,354],{},[238,5545,357],{},[238,5547,360],{},[238,5549,5550,5552,5554],{},[259,5551],{},[262,5553],{"src":367,"style":265,"frameBorder":266},[259,5555],{},[11,5557,373],{"id":372},[238,5559,376],{},[238,5561,379],{},[238,5563,382],{},[238,5565,385],{},[238,5567,388],{},[238,5569,391],{},[238,5571,394],{},[238,5573,397],{},[238,5575,400],{},[238,5577,403],{},[238,5579,406],{},[238,5581,5582,5584,5586],{},[259,5583],{},[262,5585],{"src":413,"style":265,"frameBorder":266},[259,5587],{},[238,5589,5590,5592,5594],{},[259,5591],{},[262,5593],{"src":422,"style":265,"frameBorder":266},[259,5595],{},[238,5597,427],{},[238,5599,430],{},[238,5601,433],{},[11,5603,437],{"id":436},[238,5605,440],{},[238,5607,443],{},[238,5609,446],{},[238,5611,449],{},[238,5613,452],{},[238,5615,455],{},[238,5617,458],{},[238,5619,5620,5622,5624],{},[259,5621],{},[262,5623],{"src":465,"style":265,"frameBorder":266},[259,5625],{},[238,5627,470],{},[238,5629,473],{},[238,5631,476],{},[238,5633,479],{},[238,5635,482],{},[238,5637,485],{},[238,5639,488],{},[238,5641,491],{},[238,5643,494],{},[238,5645,497],{},[238,5647,5648,5650,5652],{},[259,5649],{},[262,5651],{"src":504,"style":265,"frameBorder":266},[259,5653],{},[238,5655,5656,5658,5660],{},[259,5657],{},[262,5659],{"src":513,"style":265,"frameBorder":266},[259,5661],{},[11,5663,518],{"id":518},[238,5665,521],{},[238,5667,524],{},[238,5669,527],{},[238,5671,530],{},[238,5673,533],{},[238,5675,536],{},[238,5677,539],{},[238,5679,542],{},{"title":20,"searchDepth":35,"depth":35,"links":5681},[5682,5683,5684,5685,5686],{"id":235,"depth":35,"text":236},{"id":280,"depth":35,"text":281},{"id":372,"depth":35,"text":373},{"id":436,"depth":35,"text":437},{"id":518,"depth":35,"text":518},[551],{},{"title":230,"description":553},[559,560],{"id":563,"title":564,"body":5692,"categories":5839,"cross_post":215,"date":766,"description":767,"extension":218,"image":20,"meta":5840,"navigation":31,"note_id":215,"note_url":215,"path":769,"private":221,"qiita_id":215,"qiita_url":215,"seo":5841,"stem":771,"tags":5842,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":773},{"type":8,"value":5693,"toc":5836},[5694,5696,5834],[11,5695,569],{"id":569},[15,5697,5698],{"className":572,"code":573,"language":574,"meta":20,"style":20},[22,5699,5700,5708,5712,5726,5730,5750,5754,5758,5766,5774,5794,5810,5830],{"__ignoreMap":20},[25,5701,5702,5704,5706],{"class":27,"line":28},[25,5703,582],{"class":581},[25,5705,586],{"class":585},[25,5707,589],{"class":581},[25,5709,5710],{"class":27,"line":35},[25,5711,32],{"emptyLinePlaceholder":31},[25,5713,5714,5716,5718,5720,5722,5724],{"class":27,"line":41},[25,5715,599],{"class":598},[25,5717,603],{"class":602},[25,5719,606],{"class":598},[25,5721,609],{"class":581},[25,5723,612],{"class":585},[25,5725,615],{"class":581},[25,5727,5728],{"class":27,"line":46},[25,5729,32],{"emptyLinePlaceholder":31},[25,5731,5732,5734,5736,5738,5740,5742,5744,5746,5748],{"class":27,"line":52},[25,5733,599],{"class":598},[25,5735,626],{"class":602},[25,5737,606],{"class":598},[25,5739,631],{"class":598},[25,5741,634],{"class":581},[25,5743,637],{"class":585},[25,5745,640],{"class":581},[25,5747,644],{"class":643},[25,5749,647],{"class":581},[25,5751,5752],{"class":27,"line":58},[25,5753,32],{"emptyLinePlaceholder":31},[25,5755,5756],{"class":27,"line":63},[25,5757,657],{"class":656},[25,5759,5760,5762,5764],{"class":27,"line":69},[25,5761,662],{"class":581},[25,5763,665],{"class":585},[25,5765,668],{"class":581},[25,5767,5768,5770,5772],{"class":27,"line":75},[25,5769,662],{"class":581},[25,5771,665],{"class":585},[25,5773,677],{"class":581},[25,5775,5776,5778,5780,5782,5784,5786,5788,5790,5792],{"class":27,"line":80},[25,5777,662],{"class":581},[25,5779,665],{"class":585},[25,5781,686],{"class":581},[25,5783,689],{"class":585},[25,5785,692],{"class":581},[25,5787,696],{"class":695},[25,5789,699],{"class":581},[25,5791,702],{"class":598},[25,5793,705],{"class":581},[25,5795,5796,5798,5800,5802,5804,5806,5808],{"class":27,"line":86},[25,5797,710],{"class":581},[25,5799,713],{"class":585},[25,5801,692],{"class":581},[25,5803,696],{"class":695},[25,5805,699],{"class":581},[25,5807,702],{"class":598},[25,5809,724],{"class":581},[25,5811,5812,5814,5816,5818,5820,5822,5824,5826,5828],{"class":27,"line":92},[25,5813,729],{"class":581},[25,5815,665],{"class":585},[25,5817,734],{"class":581},[25,5819,737],{"class":602},[25,5821,740],{"class":581},[25,5823,743],{"class":585},[25,5825,746],{"class":581},[25,5827,749],{"class":585},[25,5829,752],{"class":581},[25,5831,5832],{"class":27,"line":97},[25,5833,757],{"class":581},[208,5835,760],{},{"title":20,"searchDepth":35,"depth":35,"links":5837},[5838],{"id":569,"depth":35,"text":569},[765],{},{"title":564,"description":767},[765,612,574],{"id":775,"title":776,"body":5844,"categories":5920,"cross_post":215,"date":870,"description":871,"extension":218,"image":20,"meta":5921,"navigation":31,"note_id":215,"note_url":215,"path":873,"private":221,"qiita_id":215,"qiita_url":215,"seo":5922,"stem":875,"tags":5923,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":877},{"type":8,"value":5845,"toc":5916},[5846,5848,5850,5886,5888,5890,5914],[11,5847,781],{"id":781},[238,5849,784],{},[15,5851,5852],{"className":17,"code":787,"language":19,"meta":20,"style":20},[22,5853,5854,5858,5862,5866,5870,5874,5878,5882],{"__ignoreMap":20},[25,5855,5856],{"class":27,"line":28},[25,5857,794],{},[25,5859,5860],{"class":27,"line":35},[25,5861,799],{},[25,5863,5864],{"class":27,"line":41},[25,5865,804],{},[25,5867,5868],{"class":27,"line":46},[25,5869,32],{"emptyLinePlaceholder":31},[25,5871,5872],{"class":27,"line":52},[25,5873,813],{},[25,5875,5876],{"class":27,"line":58},[25,5877,818],{},[25,5879,5880],{"class":27,"line":63},[25,5881,823],{},[25,5883,5884],{"class":27,"line":69},[25,5885,828],{},[11,5887,831],{"id":831},[238,5889,834],{},[15,5891,5892],{"className":17,"code":837,"language":19,"meta":20,"style":20},[22,5893,5894,5898,5902,5906,5910],{"__ignoreMap":20},[25,5895,5896],{"class":27,"line":28},[25,5897,844],{},[25,5899,5900],{"class":27,"line":35},[25,5901,799],{},[25,5903,5904],{"class":27,"line":41},[25,5905,804],{},[25,5907,5908],{"class":27,"line":46},[25,5909,857],{},[25,5911,5912],{"class":27,"line":52},[25,5913,862],{},[208,5915,210],{},{"title":20,"searchDepth":35,"depth":35,"links":5917},[5918,5919],{"id":781,"depth":35,"text":781},{"id":831,"depth":35,"text":831},[19],{},{"title":776,"description":871},[19,226],{"id":879,"title":880,"body":5925,"categories":6376,"cross_post":215,"date":1444,"description":1445,"extension":218,"image":20,"meta":6377,"navigation":31,"note_id":215,"note_url":215,"path":1447,"private":221,"qiita_id":215,"qiita_url":215,"seo":6378,"stem":1449,"tags":6379,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":1453},{"type":8,"value":5926,"toc":6367},[5927,5929,5931,5933,5935,5937,5941,5943,5945,5947,5955,6155,6157,6159,6167,6169,6337,6339,6341,6345,6357,6359,6361,6363,6365],[884,5928,887],{"id":886},[11,5930,890],{"id":890},[238,5932,893],{},[238,5934,896],{},[238,5936,899],{},[238,5938,902,5939,907],{},[904,5940,906],{},[238,5942,910],{},[912,5944],{},[11,5946,917],{"id":916},[304,5948,5949,5951,5953],{},[307,5950,922],{},[307,5952,925],{},[307,5954,928],{},[15,5956,5957],{"className":17,"code":931,"language":19,"meta":20,"style":20},[22,5958,5959,5963,5967,5971,5975,5979,5983,5987,5991,5995,5999,6003,6007,6011,6015,6019,6023,6027,6031,6035,6039,6043,6047,6051,6055,6059,6063,6067,6071,6075,6079,6083,6087,6091,6095,6099,6103,6107,6111,6115,6119,6123,6127,6131,6135,6139,6143,6147,6151],{"__ignoreMap":20},[25,5960,5961],{"class":27,"line":28},[25,5962,32],{"emptyLinePlaceholder":31},[25,5964,5965],{"class":27,"line":35},[25,5966,32],{"emptyLinePlaceholder":31},[25,5968,5969],{"class":27,"line":41},[25,5970,946],{},[25,5972,5973],{"class":27,"line":46},[25,5974,951],{},[25,5976,5977],{"class":27,"line":52},[25,5978,956],{},[25,5980,5981],{"class":27,"line":58},[25,5982,32],{"emptyLinePlaceholder":31},[25,5984,5985],{"class":27,"line":63},[25,5986,965],{},[25,5988,5989],{"class":27,"line":69},[25,5990,970],{},[25,5992,5993],{"class":27,"line":75},[25,5994,975],{},[25,5996,5997],{"class":27,"line":80},[25,5998,980],{},[25,6000,6001],{"class":27,"line":86},[25,6002,985],{},[25,6004,6005],{"class":27,"line":92},[25,6006,990],{},[25,6008,6009],{"class":27,"line":97},[25,6010,32],{"emptyLinePlaceholder":31},[25,6012,6013],{"class":27,"line":103},[25,6014,999],{},[25,6016,6017],{"class":27,"line":109},[25,6018,1004],{},[25,6020,6021],{"class":27,"line":114},[25,6022,1009],{},[25,6024,6025],{"class":27,"line":120},[25,6026,32],{"emptyLinePlaceholder":31},[25,6028,6029],{"class":27,"line":126},[25,6030,1018],{},[25,6032,6033],{"class":27,"line":132},[25,6034,1023],{},[25,6036,6037],{"class":27,"line":138},[25,6038,1028],{},[25,6040,6041],{"class":27,"line":144},[25,6042,1033],{},[25,6044,6045],{"class":27,"line":150},[25,6046,1038],{},[25,6048,6049],{"class":27,"line":156},[25,6050,32],{"emptyLinePlaceholder":31},[25,6052,6053],{"class":27,"line":162},[25,6054,1047],{},[25,6056,6057],{"class":27,"line":168},[25,6058,1052],{},[25,6060,6061],{"class":27,"line":174},[25,6062,1057],{},[25,6064,6065],{"class":27,"line":180},[25,6066,1062],{},[25,6068,6069],{"class":27,"line":186},[25,6070,1067],{},[25,6072,6073],{"class":27,"line":191},[25,6074,32],{"emptyLinePlaceholder":31},[25,6076,6077],{"class":27,"line":197},[25,6078,1076],{},[25,6080,6081],{"class":27,"line":203},[25,6082,1081],{},[25,6084,6085],{"class":27,"line":1084},[25,6086,1087],{},[25,6088,6089],{"class":27,"line":1090},[25,6090,1093],{},[25,6092,6093],{"class":27,"line":1096},[25,6094,1099],{},[25,6096,6097],{"class":27,"line":1102},[25,6098,1105],{},[25,6100,6101],{"class":27,"line":1108},[25,6102,32],{"emptyLinePlaceholder":31},[25,6104,6105],{"class":27,"line":1113},[25,6106,1116],{},[25,6108,6109],{"class":27,"line":1119},[25,6110,1122],{},[25,6112,6113],{"class":27,"line":1125},[25,6114,1128],{},[25,6116,6117],{"class":27,"line":1131},[25,6118,1134],{},[25,6120,6121],{"class":27,"line":1137},[25,6122,1140],{},[25,6124,6125],{"class":27,"line":1143},[25,6126,1146],{},[25,6128,6129],{"class":27,"line":1149},[25,6130,32],{"emptyLinePlaceholder":31},[25,6132,6133],{"class":27,"line":1154},[25,6134,1157],{},[25,6136,6137],{"class":27,"line":1160},[25,6138,1163],{},[25,6140,6141],{"class":27,"line":1166},[25,6142,1169],{},[25,6144,6145],{"class":27,"line":1172},[25,6146,32],{"emptyLinePlaceholder":31},[25,6148,6149],{"class":27,"line":1177},[25,6150,1180],{},[25,6152,6153],{"class":27,"line":1183},[25,6154,1186],{},[912,6156],{},[11,6158,1192],{"id":1191},[304,6160,6161,6163,6165],{},[307,6162,1197],{},[307,6164,1200],{},[307,6166,928],{},[1204,6168,1206],{"id":1206},[15,6170,6171],{"className":17,"code":1209,"language":19,"meta":20,"style":20},[22,6172,6173,6177,6181,6185,6189,6193,6197,6201,6205,6209,6213,6217,6221,6225,6229,6233,6237,6241,6245,6249,6253,6257,6261,6265,6269,6273,6277,6281,6285,6289,6293,6297,6301,6305,6309,6313,6317,6321,6325,6329,6333],{"__ignoreMap":20},[25,6174,6175],{"class":27,"line":28},[25,6176,1216],{},[25,6178,6179],{"class":27,"line":35},[25,6180,951],{},[25,6182,6183],{"class":27,"line":41},[25,6184,1225],{},[25,6186,6187],{"class":27,"line":46},[25,6188,32],{"emptyLinePlaceholder":31},[25,6190,6191],{"class":27,"line":52},[25,6192,965],{},[25,6194,6195],{"class":27,"line":58},[25,6196,970],{},[25,6198,6199],{"class":27,"line":63},[25,6200,975],{},[25,6202,6203],{"class":27,"line":69},[25,6204,980],{},[25,6206,6207],{"class":27,"line":75},[25,6208,985],{},[25,6210,6211],{"class":27,"line":80},[25,6212,990],{},[25,6214,6215],{"class":27,"line":86},[25,6216,32],{"emptyLinePlaceholder":31},[25,6218,6219],{"class":27,"line":92},[25,6220,1262],{},[25,6222,6223],{"class":27,"line":97},[25,6224,1004],{},[25,6226,6227],{"class":27,"line":103},[25,6228,1009],{},[25,6230,6231],{"class":27,"line":109},[25,6232,32],{"emptyLinePlaceholder":31},[25,6234,6235],{"class":27,"line":114},[25,6236,1018],{},[25,6238,6239],{"class":27,"line":120},[25,6240,1023],{},[25,6242,6243],{"class":27,"line":126},[25,6244,1028],{},[25,6246,6247],{"class":27,"line":132},[25,6248,1033],{},[25,6250,6251],{"class":27,"line":138},[25,6252,1038],{},[25,6254,6255],{"class":27,"line":144},[25,6256,32],{"emptyLinePlaceholder":31},[25,6258,6259],{"class":27,"line":150},[25,6260,1047],{},[25,6262,6263],{"class":27,"line":156},[25,6264,1052],{},[25,6266,6267],{"class":27,"line":162},[25,6268,1057],{},[25,6270,6271],{"class":27,"line":168},[25,6272,1062],{},[25,6274,6275],{"class":27,"line":174},[25,6276,1319],{},[25,6278,6279],{"class":27,"line":180},[25,6280,32],{"emptyLinePlaceholder":31},[25,6282,6283],{"class":27,"line":186},[25,6284,1328],{},[25,6286,6287],{"class":27,"line":191},[25,6288,1333],{},[25,6290,6291],{"class":27,"line":197},[25,6292,1338],{},[25,6294,6295],{"class":27,"line":203},[25,6296,32],{"emptyLinePlaceholder":31},[25,6298,6299],{"class":27,"line":1084},[25,6300,1347],{},[25,6302,6303],{"class":27,"line":1090},[25,6304,1352],{},[25,6306,6307],{"class":27,"line":1096},[25,6308,1357],{},[25,6310,6311],{"class":27,"line":1102},[25,6312,32],{"emptyLinePlaceholder":31},[25,6314,6315],{"class":27,"line":1108},[25,6316,1366],{},[25,6318,6319],{"class":27,"line":1113},[25,6320,1163],{},[25,6322,6323],{"class":27,"line":1119},[25,6324,1169],{},[25,6326,6327],{"class":27,"line":1125},[25,6328,32],{"emptyLinePlaceholder":31},[25,6330,6331],{"class":27,"line":1131},[25,6332,1383],{},[25,6334,6335],{"class":27,"line":1137},[25,6336,1186],{},[912,6338],{},[11,6340,1393],{"id":1392},[238,6342,1396,6343,1400],{},[904,6344,1399],{},[1402,6346,6347,6349,6351,6355],{},[307,6348,1406],{},[307,6350,1409],{},[307,6352,1412,6353,1416],{},[22,6354,1415],{},[307,6356,1419],{},[912,6358],{},[11,6360,1424],{"id":1424},[238,6362,1427],{},[238,6364,1430],{},[208,6366,210],{},{"title":20,"searchDepth":35,"depth":35,"links":6368},[6369,6370,6371,6374,6375],{"id":890,"depth":35,"text":890},{"id":916,"depth":35,"text":917},{"id":1191,"depth":35,"text":1192,"children":6372},[6373],{"id":1206,"depth":41,"text":1206},{"id":1392,"depth":35,"text":1393},{"id":1424,"depth":35,"text":1424},[1443],{},{"title":880,"description":1445},[1451,1452],{"id":1455,"title":1456,"body":6381,"categories":6476,"cross_post":215,"date":1583,"description":1584,"extension":218,"image":20,"meta":6477,"navigation":31,"note_id":215,"note_url":215,"path":1586,"private":221,"qiita_id":215,"qiita_url":215,"seo":6478,"stem":1588,"tags":6479,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":1592},{"type":8,"value":6382,"toc":6472},[6383,6385,6387,6389,6391,6393,6401,6403,6447,6455,6460,6465,6470],[1204,6384,1461],{"id":1461},[238,6386,1464],{},[238,6388,1467],{},[238,6390,1470],{},[11,6392,1473],{"id":1473},[304,6394,6395,6397,6399],{},[307,6396,1478],{},[307,6398,1481],{},[307,6400,1484],{},[238,6402,1487],{},[15,6404,6405],{"className":17,"code":1490,"language":19,"meta":20,"style":20},[22,6406,6407,6411,6415,6419,6423,6427,6431,6435,6439,6443],{"__ignoreMap":20},[25,6408,6409],{"class":27,"line":28},[25,6410,32],{"emptyLinePlaceholder":31},[25,6412,6413],{"class":27,"line":35},[25,6414,1501],{},[25,6416,6417],{"class":27,"line":41},[25,6418,1506],{},[25,6420,6421],{"class":27,"line":46},[25,6422,1511],{},[25,6424,6425],{"class":27,"line":52},[25,6426,1516],{},[25,6428,6429],{"class":27,"line":58},[25,6430,1521],{},[25,6432,6433],{"class":27,"line":63},[25,6434,1526],{},[25,6436,6437],{"class":27,"line":69},[25,6438,1531],{},[25,6440,6441],{"class":27,"line":75},[25,6442,1536],{},[25,6444,6445],{"class":27,"line":80},[25,6446,1186],{},[238,6448,6449,6452],{},[1544,6450,1549],{"href":1546,"rel":6451},[1548],[1544,6453,1554],{"href":1552,"rel":6454},[1548],[238,6456,6457],{},[1544,6458,1561],{"href":1559,"rel":6459},[1548],[238,6461,6462],{},[1544,6463,1568],{"href":1566,"rel":6464},[1548],[238,6466,6467],{},[1544,6468,1575],{"href":1573,"rel":6469},[1548],[208,6471,210],{},{"title":20,"searchDepth":35,"depth":35,"links":6473},[6474,6475],{"id":1461,"depth":41,"text":1461},{"id":1473,"depth":35,"text":1473},[1443],{},{"title":1456,"description":1584},[1443,1452,1590,1591],{"id":1594,"title":1595,"body":6481,"categories":6627,"cross_post":215,"date":1769,"description":1770,"extension":218,"image":20,"meta":6628,"navigation":31,"note_id":215,"note_url":215,"path":1772,"private":221,"qiita_id":215,"qiita_url":215,"seo":6629,"stem":1774,"tags":6630,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":1776},{"type":8,"value":6482,"toc":6625},[6483,6623],[15,6484,6485],{"className":17,"code":1600,"language":19,"meta":20,"style":20},[22,6486,6487,6491,6495,6499,6503,6507,6511,6515,6519,6523,6527,6531,6535,6539,6543,6547,6551,6555,6559,6563,6567,6571,6575,6579,6583,6587,6591,6595,6599,6603,6607,6611,6615,6619],{"__ignoreMap":20},[25,6488,6489],{"class":27,"line":28},[25,6490,1607],{},[25,6492,6493],{"class":27,"line":35},[25,6494,32],{"emptyLinePlaceholder":31},[25,6496,6497],{"class":27,"line":41},[25,6498,1616],{},[25,6500,6501],{"class":27,"line":46},[25,6502,1621],{},[25,6504,6505],{"class":27,"line":52},[25,6506,1626],{},[25,6508,6509],{"class":27,"line":58},[25,6510,1631],{},[25,6512,6513],{"class":27,"line":63},[25,6514,32],{"emptyLinePlaceholder":31},[25,6516,6517],{"class":27,"line":69},[25,6518,32],{"emptyLinePlaceholder":31},[25,6520,6521],{"class":27,"line":75},[25,6522,32],{"emptyLinePlaceholder":31},[25,6524,6525],{"class":27,"line":80},[25,6526,1648],{},[25,6528,6529],{"class":27,"line":86},[25,6530,32],{"emptyLinePlaceholder":31},[25,6532,6533],{"class":27,"line":92},[25,6534,1657],{},[25,6536,6537],{"class":27,"line":97},[25,6538,1662],{},[25,6540,6541],{"class":27,"line":103},[25,6542,1667],{},[25,6544,6545],{"class":27,"line":109},[25,6546,1672],{},[25,6548,6549],{"class":27,"line":114},[25,6550,1038],{},[25,6552,6553],{"class":27,"line":120},[25,6554,1681],{},[25,6556,6557],{"class":27,"line":126},[25,6558,32],{"emptyLinePlaceholder":31},[25,6560,6561],{"class":27,"line":132},[25,6562,32],{"emptyLinePlaceholder":31},[25,6564,6565],{"class":27,"line":138},[25,6566,1694],{},[25,6568,6569],{"class":27,"line":144},[25,6570,1699],{},[25,6572,6573],{"class":27,"line":150},[25,6574,1704],{},[25,6576,6577],{"class":27,"line":156},[25,6578,1709],{},[25,6580,6581],{"class":27,"line":162},[25,6582,1714],{},[25,6584,6585],{"class":27,"line":168},[25,6586,1719],{},[25,6588,6589],{"class":27,"line":174},[25,6590,1724],{},[25,6592,6593],{"class":27,"line":180},[25,6594,1729],{},[25,6596,6597],{"class":27,"line":186},[25,6598,1734],{},[25,6600,6601],{"class":27,"line":191},[25,6602,1739],{},[25,6604,6605],{"class":27,"line":197},[25,6606,1744],{},[25,6608,6609],{"class":27,"line":203},[25,6610,32],{"emptyLinePlaceholder":31},[25,6612,6613],{"class":27,"line":1084},[25,6614,1753],{},[25,6616,6617],{"class":27,"line":1090},[25,6618,1758],{},[25,6620,6621],{"class":27,"line":1096},[25,6622,1763],{},[208,6624,210],{},{"title":20,"searchDepth":35,"depth":35,"links":6626},[],[1443],{},{"title":1595,"description":1770},[1590,1443],{"id":1778,"title":1779,"body":6632,"categories":6798,"cross_post":215,"date":1967,"description":1968,"extension":218,"image":20,"meta":6799,"navigation":31,"note_id":215,"note_url":215,"path":1970,"private":221,"qiita_id":215,"qiita_url":215,"seo":6800,"stem":1972,"tags":6801,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":1974},{"type":8,"value":6633,"toc":6796},[6634,6794],[15,6635,6636],{"className":17,"code":1784,"language":19,"meta":20,"style":20},[22,6637,6638,6642,6646,6650,6654,6658,6662,6666,6670,6674,6678,6682,6686,6690,6694,6698,6702,6706,6710,6714,6718,6722,6726,6730,6734,6738,6742,6746,6750,6754,6758,6762,6766,6770,6774,6778,6782,6786,6790],{"__ignoreMap":20},[25,6639,6640],{"class":27,"line":28},[25,6641,32],{"emptyLinePlaceholder":31},[25,6643,6644],{"class":27,"line":35},[25,6645,1795],{},[25,6647,6648],{"class":27,"line":41},[25,6649,32],{"emptyLinePlaceholder":31},[25,6651,6652],{"class":27,"line":46},[25,6653,1804],{},[25,6655,6656],{"class":27,"line":52},[25,6657,32],{"emptyLinePlaceholder":31},[25,6659,6660],{"class":27,"line":58},[25,6661,32],{"emptyLinePlaceholder":31},[25,6663,6664],{"class":27,"line":63},[25,6665,32],{"emptyLinePlaceholder":31},[25,6667,6668],{"class":27,"line":69},[25,6669,1821],{},[25,6671,6672],{"class":27,"line":75},[25,6673,32],{"emptyLinePlaceholder":31},[25,6675,6676],{"class":27,"line":80},[25,6677,1830],{},[25,6679,6680],{"class":27,"line":86},[25,6681,32],{"emptyLinePlaceholder":31},[25,6683,6684],{"class":27,"line":92},[25,6685,1839],{},[25,6687,6688],{"class":27,"line":97},[25,6689,1844],{},[25,6691,6692],{"class":27,"line":103},[25,6693,1849],{},[25,6695,6696],{"class":27,"line":109},[25,6697,1662],{},[25,6699,6700],{"class":27,"line":114},[25,6701,1667],{},[25,6703,6704],{"class":27,"line":120},[25,6705,1672],{},[25,6707,6708],{"class":27,"line":126},[25,6709,1038],{},[25,6711,6712],{"class":27,"line":132},[25,6713,1681],{},[25,6715,6716],{"class":27,"line":138},[25,6717,32],{"emptyLinePlaceholder":31},[25,6719,6720],{"class":27,"line":144},[25,6721,1699],{},[25,6723,6724],{"class":27,"line":150},[25,6725,1704],{},[25,6727,6728],{"class":27,"line":156},[25,6729,1886],{},[25,6731,6732],{"class":27,"line":162},[25,6733,1891],{},[25,6735,6736],{"class":27,"line":168},[25,6737,1896],{},[25,6739,6740],{"class":27,"line":174},[25,6741,1901],{},[25,6743,6744],{"class":27,"line":180},[25,6745,1906],{},[25,6747,6748],{"class":27,"line":186},[25,6749,1526],{},[25,6751,6752],{"class":27,"line":191},[25,6753,1038],{},[25,6755,6756],{"class":27,"line":197},[25,6757,1919],{},[25,6759,6760],{"class":27,"line":203},[25,6761,1924],{},[25,6763,6764],{"class":27,"line":1084},[25,6765,1186],{},[25,6767,6768],{"class":27,"line":1090},[25,6769,32],{"emptyLinePlaceholder":31},[25,6771,6772],{"class":27,"line":1096},[25,6773,1937],{},[25,6775,6776],{"class":27,"line":1102},[25,6777,1942],{},[25,6779,6780],{"class":27,"line":1108},[25,6781,1947],{},[25,6783,6784],{"class":27,"line":1113},[25,6785,1952],{},[25,6787,6788],{"class":27,"line":1119},[25,6789,1957],{},[25,6791,6792],{"class":27,"line":1125},[25,6793,1186],{},[208,6795,210],{},{"title":20,"searchDepth":35,"depth":35,"links":6797},[],[1443],{},{"title":1779,"description":1968},[1590,1443],{"id":1976,"title":1977,"body":6803,"categories":7012,"cross_post":215,"date":2235,"description":2236,"extension":218,"image":20,"meta":7013,"navigation":31,"note_id":215,"note_url":215,"path":2238,"private":221,"qiita_id":215,"qiita_url":215,"seo":7014,"stem":2240,"tags":7015,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":2242},{"type":8,"value":6804,"toc":7009},[6805,6995,6997,7002,7007],[15,6806,6807],{"className":572,"code":1982,"language":574,"meta":20,"style":20},[22,6808,6809,6843,6847,6861,6897,6905,6909,6913,6931,6949,6967,6971],{"__ignoreMap":20},[25,6810,6811,6813,6815,6817,6819,6821,6823,6825,6827,6829,6831,6833,6835,6837,6839,6841],{"class":27,"line":28},[25,6812,599],{"class":598},[25,6814,1991],{"class":602},[25,6816,606],{"class":598},[25,6818,1996],{"class":581},[25,6820,1999],{"class":602},[25,6822,2002],{"class":581},[25,6824,1999],{"class":602},[25,6826,2002],{"class":581},[25,6828,1999],{"class":602},[25,6830,2002],{"class":581},[25,6832,2013],{"class":602},[25,6834,2002],{"class":581},[25,6836,2013],{"class":602},[25,6838,2002],{"class":581},[25,6840,2022],{"class":602},[25,6842,2025],{"class":581},[25,6844,6845],{"class":27,"line":35},[25,6846,32],{"emptyLinePlaceholder":31},[25,6848,6849,6851,6853,6855,6857,6859],{"class":27,"line":41},[25,6850,599],{"class":598},[25,6852,2036],{"class":602},[25,6854,606],{"class":598},[25,6856,2041],{"class":581},[25,6858,2044],{"class":585},[25,6860,2047],{"class":581},[25,6862,6863,6865,6867,6869,6871,6873,6875,6877,6879,6881,6883,6885,6887,6889,6891,6893,6895],{"class":27,"line":46},[25,6864,2052],{"class":581},[25,6866,2055],{"class":695},[25,6868,2002],{"class":581},[25,6870,2060],{"class":695},[25,6872,699],{"class":581},[25,6874,702],{"class":598},[25,6876,2067],{"class":581},[25,6878,2070],{"class":585},[25,6880,2073],{"class":581},[25,6882,2076],{"class":585},[25,6884,2079],{"class":581},[25,6886,2082],{"class":598},[25,6888,2085],{"class":602},[25,6890,699],{"class":581},[25,6892,2090],{"class":598},[25,6894,2093],{"class":602},[25,6896,2096],{"class":581},[25,6898,6899,6901,6903],{"class":27,"line":52},[25,6900,2101],{"class":598},[25,6902,2104],{"class":585},[25,6904,615],{"class":581},[25,6906,6907],{"class":27,"line":58},[25,6908,2111],{"class":581},[25,6910,6911],{"class":27,"line":63},[25,6912,32],{"emptyLinePlaceholder":31},[25,6914,6915,6917,6919,6921,6923,6925,6927,6929],{"class":27,"line":69},[25,6916,662],{"class":581},[25,6918,665],{"class":585},[25,6920,2124],{"class":581},[25,6922,2127],{"class":598},[25,6924,2130],{"class":581},[25,6926,2133],{"class":585},[25,6928,2136],{"class":581},[25,6930,2139],{"class":656},[25,6932,6933,6935,6937,6939,6941,6943,6945,6947],{"class":27,"line":75},[25,6934,662],{"class":581},[25,6936,665],{"class":585},[25,6938,2124],{"class":581},[25,6940,2127],{"class":598},[25,6942,2130],{"class":581},[25,6944,2154],{"class":585},[25,6946,2136],{"class":581},[25,6948,2159],{"class":656},[25,6950,6951,6953,6955,6957,6959,6961,6963,6965],{"class":27,"line":80},[25,6952,662],{"class":581},[25,6954,665],{"class":585},[25,6956,2124],{"class":581},[25,6958,2127],{"class":598},[25,6960,2130],{"class":581},[25,6962,2174],{"class":585},[25,6964,2136],{"class":581},[25,6966,2179],{"class":656},[25,6968,6969],{"class":27,"line":86},[25,6970,32],{"emptyLinePlaceholder":31},[25,6972,6973,6975,6977,6979,6981,6983,6985,6987,6989,6991,6993],{"class":27,"line":92},[25,6974,599],{"class":598},[25,6976,2190],{"class":602},[25,6978,606],{"class":598},[25,6980,2195],{"class":581},[25,6982,2198],{"class":585},[25,6984,640],{"class":581},[25,6986,2127],{"class":598},[25,6988,2130],{"class":581},[25,6990,2154],{"class":585},[25,6992,2209],{"class":581},[25,6994,2212],{"class":656},[1204,6996,2215],{"id":2215},[238,6998,6999],{},[1544,7000,2220],{"href":2220,"rel":7001},[1548],[238,7003,7004],{},[1544,7005,2226],{"href":2226,"rel":7006},[1548],[208,7008,2230],{},{"title":20,"searchDepth":35,"depth":35,"links":7010},[7011],{"id":2215,"depth":41,"text":2215},[1443],{},{"title":1977,"description":2236},[1443,1451],{"id":2244,"title":2245,"body":7017,"categories":8734,"cross_post":215,"date":4460,"description":4461,"extension":218,"image":20,"meta":8735,"navigation":31,"note_id":215,"note_url":215,"path":4463,"private":221,"qiita_id":215,"qiita_url":215,"seo":8736,"stem":4465,"tags":8737,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":4469},{"type":8,"value":7018,"toc":8707},[7019,7021,7023,7025,7027,7029,7039,7041,7051,7053,7055,7057,7089,7091,7093,7157,7159,7231,7233,7235,7291,7293,7295,7343,7345,7433,7435,7437,7445,7447,7455,7457,7513,7515,7517,7519,7529,7531,7576,8648,8650,8680,8682,8684,8686,8688,8705],[11,7020,890],{"id":890},[238,7022,2252],{},[238,7024,2255],{},[11,7026,2258],{"id":2258},[1204,7028,2261],{"id":2261},[304,7030,7031,7033,7035,7037],{},[307,7032,2266],{},[307,7034,2269],{},[307,7036,2272],{},[307,7038,2275],{},[1204,7040,2278],{"id":2278},[1402,7042,7043,7045,7047,7049],{},[307,7044,2283],{},[307,7046,2286],{},[307,7048,2289],{},[307,7050,2292],{},[11,7052,2295],{"id":2295},[1204,7054,2299],{"id":2298},[238,7056,2302],{},[15,7058,7059],{"className":17,"code":2305,"language":19,"meta":20,"style":20},[22,7060,7061,7065,7069,7073,7077,7081,7085],{"__ignoreMap":20},[25,7062,7063],{"class":27,"line":28},[25,7064,2312],{},[25,7066,7067],{"class":27,"line":35},[25,7068,2317],{},[25,7070,7071],{"class":27,"line":41},[25,7072,2322],{},[25,7074,7075],{"class":27,"line":46},[25,7076,2327],{},[25,7078,7079],{"class":27,"line":52},[25,7080,2332],{},[25,7082,7083],{"class":27,"line":58},[25,7084,2337],{},[25,7086,7087],{"class":27,"line":63},[25,7088,2342],{},[1204,7090,2346],{"id":2345},[1204,7092,2349],{"id":2349},[15,7094,7095],{"className":17,"code":2352,"language":19,"meta":20,"style":20},[22,7096,7097,7101,7105,7109,7113,7117,7121,7125,7129,7133,7137,7141,7145,7149,7153],{"__ignoreMap":20},[25,7098,7099],{"class":27,"line":28},[25,7100,2359],{},[25,7102,7103],{"class":27,"line":35},[25,7104,2364],{},[25,7106,7107],{"class":27,"line":41},[25,7108,2369],{},[25,7110,7111],{"class":27,"line":46},[25,7112,2374],{},[25,7114,7115],{"class":27,"line":52},[25,7116,2379],{},[25,7118,7119],{"class":27,"line":58},[25,7120,2384],{},[25,7122,7123],{"class":27,"line":63},[25,7124,2389],{},[25,7126,7127],{"class":27,"line":69},[25,7128,2394],{},[25,7130,7131],{"class":27,"line":75},[25,7132,2399],{},[25,7134,7135],{"class":27,"line":80},[25,7136,2404],{},[25,7138,7139],{"class":27,"line":86},[25,7140,2409],{},[25,7142,7143],{"class":27,"line":92},[25,7144,2414],{},[25,7146,7147],{"class":27,"line":97},[25,7148,2419],{},[25,7150,7151],{"class":27,"line":103},[25,7152,2424],{},[25,7154,7155],{"class":27,"line":109},[25,7156,1169],{},[1204,7158,2431],{"id":2431},[15,7160,7161],{"className":17,"code":2434,"language":19,"meta":20,"style":20},[22,7162,7163,7167,7171,7175,7179,7183,7187,7191,7195,7199,7203,7207,7211,7215,7219,7223,7227],{"__ignoreMap":20},[25,7164,7165],{"class":27,"line":28},[25,7166,2441],{},[25,7168,7169],{"class":27,"line":35},[25,7170,2446],{},[25,7172,7173],{"class":27,"line":41},[25,7174,2451],{},[25,7176,7177],{"class":27,"line":46},[25,7178,2456],{},[25,7180,7181],{"class":27,"line":52},[25,7182,2461],{},[25,7184,7185],{"class":27,"line":58},[25,7186,2384],{},[25,7188,7189],{"class":27,"line":63},[25,7190,2389],{},[25,7192,7193],{"class":27,"line":69},[25,7194,2474],{},[25,7196,7197],{"class":27,"line":75},[25,7198,2479],{},[25,7200,7201],{"class":27,"line":80},[25,7202,2484],{},[25,7204,7205],{"class":27,"line":86},[25,7206,2489],{},[25,7208,7209],{"class":27,"line":92},[25,7210,2494],{},[25,7212,7213],{"class":27,"line":97},[25,7214,2414],{},[25,7216,7217],{"class":27,"line":103},[25,7218,2503],{},[25,7220,7221],{"class":27,"line":109},[25,7222,2424],{},[25,7224,7225],{"class":27,"line":114},[25,7226,1169],{},[25,7228,7229],{"class":27,"line":120},[25,7230,1186],{},[1204,7232,2519],{"id":2518},[1204,7234,2522],{"id":2522},[15,7236,7237],{"className":17,"code":2525,"language":19,"meta":20,"style":20},[22,7238,7239,7243,7247,7251,7255,7259,7263,7267,7271,7275,7279,7283,7287],{"__ignoreMap":20},[25,7240,7241],{"class":27,"line":28},[25,7242,2532],{},[25,7244,7245],{"class":27,"line":35},[25,7246,2537],{},[25,7248,7249],{"class":27,"line":41},[25,7250,2542],{},[25,7252,7253],{"class":27,"line":46},[25,7254,2547],{},[25,7256,7257],{"class":27,"line":52},[25,7258,32],{"emptyLinePlaceholder":31},[25,7260,7261],{"class":27,"line":58},[25,7262,2556],{},[25,7264,7265],{"class":27,"line":63},[25,7266,2561],{},[25,7268,7269],{"class":27,"line":69},[25,7270,2566],{},[25,7272,7273],{"class":27,"line":75},[25,7274,2571],{},[25,7276,7277],{"class":27,"line":80},[25,7278,2576],{},[25,7280,7281],{"class":27,"line":86},[25,7282,32],{"emptyLinePlaceholder":31},[25,7284,7285],{"class":27,"line":92},[25,7286,2585],{},[25,7288,7289],{"class":27,"line":97},[25,7290,1186],{},[1204,7292,2593],{"id":2592},[238,7294,2596],{},[15,7296,7297],{"className":17,"code":2599,"language":19,"meta":20,"style":20},[22,7298,7299,7303,7307,7311,7315,7319,7323,7327,7331,7335,7339],{"__ignoreMap":20},[25,7300,7301],{"class":27,"line":28},[25,7302,32],{"emptyLinePlaceholder":31},[25,7304,7305],{"class":27,"line":35},[25,7306,2610],{},[25,7308,7309],{"class":27,"line":41},[25,7310,2615],{},[25,7312,7313],{"class":27,"line":46},[25,7314,2620],{},[25,7316,7317],{"class":27,"line":52},[25,7318,2625],{},[25,7320,7321],{"class":27,"line":58},[25,7322,2630],{},[25,7324,7325],{"class":27,"line":63},[25,7326,2635],{},[25,7328,7329],{"class":27,"line":69},[25,7330,2640],{},[25,7332,7333],{"class":27,"line":75},[25,7334,2645],{},[25,7336,7337],{"class":27,"line":80},[25,7338,2650],{},[25,7340,7341],{"class":27,"line":86},[25,7342,1186],{},[1204,7344,2658],{"id":2657},[15,7346,7347],{"className":17,"code":2661,"language":19,"meta":20,"style":20},[22,7348,7349,7353,7357,7361,7365,7369,7373,7377,7381,7385,7389,7393,7397,7401,7405,7409,7413,7417,7421,7425,7429],{"__ignoreMap":20},[25,7350,7351],{"class":27,"line":28},[25,7352,2668],{},[25,7354,7355],{"class":27,"line":35},[25,7356,2673],{},[25,7358,7359],{"class":27,"line":41},[25,7360,2678],{},[25,7362,7363],{"class":27,"line":46},[25,7364,2683],{},[25,7366,7367],{"class":27,"line":52},[25,7368,2688],{},[25,7370,7371],{"class":27,"line":58},[25,7372,32],{"emptyLinePlaceholder":31},[25,7374,7375],{"class":27,"line":63},[25,7376,2697],{},[25,7378,7379],{"class":27,"line":69},[25,7380,2702],{},[25,7382,7383],{"class":27,"line":75},[25,7384,1163],{},[25,7386,7387],{"class":27,"line":80},[25,7388,32],{"emptyLinePlaceholder":31},[25,7390,7391],{"class":27,"line":86},[25,7392,2697],{},[25,7394,7395],{"class":27,"line":92},[25,7396,2719],{},[25,7398,7399],{"class":27,"line":97},[25,7400,1163],{},[25,7402,7403],{"class":27,"line":103},[25,7404,32],{"emptyLinePlaceholder":31},[25,7406,7407],{"class":27,"line":109},[25,7408,2732],{},[25,7410,7411],{"class":27,"line":114},[25,7412,2737],{},[25,7414,7415],{"class":27,"line":120},[25,7416,32],{"emptyLinePlaceholder":31},[25,7418,7419],{"class":27,"line":126},[25,7420,2746],{},[25,7422,7423],{"class":27,"line":132},[25,7424,2751],{},[25,7426,7427],{"class":27,"line":138},[25,7428,1038],{},[25,7430,7431],{"class":27,"line":144},[25,7432,1186],{},[11,7434,2762],{"id":2762},[1204,7436,2766],{"id":2765},[304,7438,7439,7441,7443],{},[307,7440,2771],{},[307,7442,2774],{},[307,7444,2777],{},[1204,7446,2781],{"id":2780},[304,7448,7449,7451,7453],{},[307,7450,2786],{},[307,7452,2789],{},[307,7454,2792],{},[1204,7456,2796],{"id":2795},[15,7458,7459],{"className":17,"code":2799,"language":19,"meta":20,"style":20},[22,7460,7461,7465,7469,7473,7477,7481,7485,7489,7493,7497,7501,7505,7509],{"__ignoreMap":20},[25,7462,7463],{"class":27,"line":28},[25,7464,2806],{},[25,7466,7467],{"class":27,"line":35},[25,7468,2811],{},[25,7470,7471],{"class":27,"line":41},[25,7472,2816],{},[25,7474,7475],{"class":27,"line":46},[25,7476,2821],{},[25,7478,7479],{"class":27,"line":52},[25,7480,2826],{},[25,7482,7483],{"class":27,"line":58},[25,7484,1169],{},[25,7486,7487],{"class":27,"line":63},[25,7488,32],{"emptyLinePlaceholder":31},[25,7490,7491],{"class":27,"line":69},[25,7492,2839],{},[25,7494,7495],{"class":27,"line":75},[25,7496,2844],{},[25,7498,7499],{"class":27,"line":80},[25,7500,2849],{},[25,7502,7503],{"class":27,"line":86},[25,7504,2854],{},[25,7506,7507],{"class":27,"line":92},[25,7508,2859],{},[25,7510,7511],{"class":27,"line":97},[25,7512,1186],{},[11,7514,2286],{"id":2866},[238,7516,2869],{},[238,7518,2872],{},[1402,7520,7521,7523,7525,7527],{},[307,7522,2877],{},[307,7524,2880],{},[307,7526,2883],{},[307,7528,2886],{},[11,7530,2889],{"id":2889},[1402,7532,7533,7535,7544,7550,7560,7562,7568],{},[307,7534,2894],{},[307,7536,2897,7537],{},[1402,7538,7539],{},[307,7540,2902,7541,2908],{},[1544,7542,2907],{"href":2905,"rel":7543},[1548],[307,7545,2911,7546],{},[1402,7547,7548],{},[307,7549,2916],{},[307,7551,7552,2922,7554],{},[904,7553,2921],{},[304,7555,7556],{},[307,7557,2927,7558,2931],{},[22,7559,2930],{},[307,7561,2934],{},[307,7563,2937,7564],{},[1402,7565,7566],{},[307,7567,2942],{},[307,7569,7570,7572],{},[904,7571,2947],{},[304,7573,7574],{},[307,7575,2952],{},[15,7577,7578],{"className":17,"code":2955,"language":19,"meta":20,"style":20},[22,7579,7580,7584,7588,7592,7596,7600,7604,7608,7612,7616,7620,7624,7628,7632,7636,7640,7644,7648,7652,7656,7660,7664,7668,7672,7676,7680,7684,7688,7692,7696,7700,7704,7708,7712,7716,7720,7724,7728,7732,7736,7740,7744,7748,7752,7756,7760,7764,7768,7772,7776,7780,7784,7788,7792,7796,7800,7804,7808,7812,7816,7820,7824,7828,7832,7836,7840,7844,7848,7852,7856,7860,7864,7868,7872,7876,7880,7884,7888,7892,7896,7900,7904,7908,7912,7916,7920,7924,7928,7932,7936,7940,7944,7948,7952,7956,7960,7964,7968,7972,7976,7980,7984,7988,7992,7996,8000,8004,8008,8012,8016,8020,8024,8028,8032,8036,8040,8044,8048,8052,8056,8060,8064,8068,8072,8076,8080,8084,8088,8092,8096,8100,8104,8108,8112,8116,8120,8124,8128,8132,8136,8140,8144,8148,8152,8156,8160,8164,8168,8172,8176,8180,8184,8188,8192,8196,8200,8204,8208,8212,8216,8220,8224,8228,8232,8236,8240,8244,8248,8252,8256,8260,8264,8268,8272,8276,8280,8284,8288,8292,8296,8300,8304,8308,8312,8316,8320,8324,8328,8332,8336,8340,8344,8348,8352,8356,8360,8364,8368,8372,8376,8380,8384,8388,8392,8396,8400,8404,8408,8412,8416,8420,8424,8428,8432,8436,8440,8444,8448,8452,8456,8460,8464,8468,8472,8476,8480,8484,8488,8492,8496,8500,8504,8508,8512,8516,8520,8524,8528,8532,8536,8540,8544,8548,8552,8556,8560,8564,8568,8572,8576,8580,8584,8588,8592,8596,8600,8604,8608,8612,8616,8620,8624,8628,8632,8636,8640,8644],{"__ignoreMap":20},[25,7581,7582],{"class":27,"line":28},[25,7583,2962],{},[25,7585,7586],{"class":27,"line":35},[25,7587,2312],{},[25,7589,7590],{"class":27,"line":41},[25,7591,2317],{},[25,7593,7594],{"class":27,"line":46},[25,7595,2322],{},[25,7597,7598],{"class":27,"line":52},[25,7599,2327],{},[25,7601,7602],{"class":27,"line":58},[25,7603,2332],{},[25,7605,7606],{"class":27,"line":63},[25,7607,2337],{},[25,7609,7610],{"class":27,"line":69},[25,7611,2342],{},[25,7613,7614],{"class":27,"line":75},[25,7615,32],{"emptyLinePlaceholder":31},[25,7617,7618],{"class":27,"line":80},[25,7619,2999],{},[25,7621,7622],{"class":27,"line":86},[25,7623,3004],{},[25,7625,7626],{"class":27,"line":92},[25,7627,3009],{},[25,7629,7630],{"class":27,"line":97},[25,7631,3014],{},[25,7633,7634],{"class":27,"line":103},[25,7635,3019],{},[25,7637,7638],{"class":27,"line":109},[25,7639,2342],{},[25,7641,7642],{"class":27,"line":114},[25,7643,32],{"emptyLinePlaceholder":31},[25,7645,7646],{"class":27,"line":120},[25,7647,32],{"emptyLinePlaceholder":31},[25,7649,7650],{"class":27,"line":126},[25,7651,32],{"emptyLinePlaceholder":31},[25,7653,7654],{"class":27,"line":132},[25,7655,32],{"emptyLinePlaceholder":31},[25,7657,7658],{"class":27,"line":138},[25,7659,32],{"emptyLinePlaceholder":31},[25,7661,7662],{"class":27,"line":144},[25,7663,3048],{},[25,7665,7666],{"class":27,"line":150},[25,7667,2668],{},[25,7669,7670],{"class":27,"line":156},[25,7671,2673],{},[25,7673,7674],{"class":27,"line":162},[25,7675,3061],{},[25,7677,7678],{"class":27,"line":168},[25,7679,2678],{},[25,7681,7682],{"class":27,"line":174},[25,7683,2683],{},[25,7685,7686],{"class":27,"line":180},[25,7687,2688],{},[25,7689,7690],{"class":27,"line":186},[25,7691,32],{"emptyLinePlaceholder":31},[25,7693,7694],{"class":27,"line":191},[25,7695,3082],{},[25,7697,7698],{"class":27,"line":197},[25,7699,3087],{},[25,7701,7702],{"class":27,"line":203},[25,7703,2697],{},[25,7705,7706],{"class":27,"line":1084},[25,7707,32],{"emptyLinePlaceholder":31},[25,7709,7710],{"class":27,"line":1090},[25,7711,2702],{},[25,7713,7714],{"class":27,"line":1096},[25,7715,1163],{},[25,7717,7718],{"class":27,"line":1102},[25,7719,32],{"emptyLinePlaceholder":31},[25,7721,7722],{"class":27,"line":1108},[25,7723,3112],{},[25,7725,7726],{"class":27,"line":1113},[25,7727,3117],{},[25,7729,7730],{"class":27,"line":1119},[25,7731,2697],{},[25,7733,7734],{"class":27,"line":1125},[25,7735,3126],{},[25,7737,7738],{"class":27,"line":1131},[25,7739,3131],{},[25,7741,7742],{"class":27,"line":1137},[25,7743,2719],{},[25,7745,7746],{"class":27,"line":1143},[25,7747,1163],{},[25,7749,7750],{"class":27,"line":1149},[25,7751,32],{"emptyLinePlaceholder":31},[25,7753,7754],{"class":27,"line":1154},[25,7755,3148],{},[25,7757,7758],{"class":27,"line":1160},[25,7759,3153],{},[25,7761,7762],{"class":27,"line":1166},[25,7763,2732],{},[25,7765,7766],{"class":27,"line":1172},[25,7767,32],{"emptyLinePlaceholder":31},[25,7769,7770],{"class":27,"line":1177},[25,7771,3166],{},[25,7773,7774],{"class":27,"line":1183},[25,7775,3171],{},[25,7777,7778],{"class":27,"line":3174},[25,7779,2737],{},[25,7781,7782],{"class":27,"line":3179},[25,7783,32],{"emptyLinePlaceholder":31},[25,7785,7786],{"class":27,"line":3184},[25,7787,2746],{},[25,7789,7790],{"class":27,"line":3189},[25,7791,2751],{},[25,7793,7794],{"class":27,"line":3194},[25,7795,1038],{},[25,7797,7798],{"class":27,"line":3199},[25,7799,1186],{},[25,7801,7802],{"class":27,"line":3204},[25,7803,32],{"emptyLinePlaceholder":31},[25,7805,7806],{"class":27,"line":3209},[25,7807,32],{"emptyLinePlaceholder":31},[25,7809,7810],{"class":27,"line":3214},[25,7811,32],{"emptyLinePlaceholder":31},[25,7813,7814],{"class":27,"line":3219},[25,7815,32],{"emptyLinePlaceholder":31},[25,7817,7818],{"class":27,"line":3224},[25,7819,2359],{},[25,7821,7822],{"class":27,"line":3229},[25,7823,2364],{},[25,7825,7826],{"class":27,"line":3234},[25,7827,2369],{},[25,7829,7830],{"class":27,"line":3239},[25,7831,2374],{},[25,7833,7834],{"class":27,"line":3244},[25,7835,2379],{},[25,7837,7838],{"class":27,"line":3249},[25,7839,2384],{},[25,7841,7842],{"class":27,"line":3254},[25,7843,2389],{},[25,7845,7846],{"class":27,"line":3259},[25,7847,2394],{},[25,7849,7850],{"class":27,"line":3264},[25,7851,2399],{},[25,7853,7854],{"class":27,"line":3269},[25,7855,2404],{},[25,7857,7858],{"class":27,"line":3274},[25,7859,2409],{},[25,7861,7862],{"class":27,"line":3279},[25,7863,2414],{},[25,7865,7866],{"class":27,"line":3284},[25,7867,2419],{},[25,7869,7870],{"class":27,"line":3289},[25,7871,2424],{},[25,7873,7874],{"class":27,"line":3294},[25,7875,1169],{},[25,7877,7878],{"class":27,"line":3299},[25,7879,32],{"emptyLinePlaceholder":31},[25,7881,7882],{"class":27,"line":3304},[25,7883,3307],{},[25,7885,7886],{"class":27,"line":3310},[25,7887,3313],{},[25,7889,7890],{"class":27,"line":3316},[25,7891,1186],{},[25,7893,7894],{"class":27,"line":3321},[25,7895,32],{"emptyLinePlaceholder":31},[25,7897,7898],{"class":27,"line":3326},[25,7899,2441],{},[25,7901,7902],{"class":27,"line":3331},[25,7903,2446],{},[25,7905,7906],{"class":27,"line":3336},[25,7907,2451],{},[25,7909,7910],{"class":27,"line":3341},[25,7911,2456],{},[25,7913,7914],{"class":27,"line":3346},[25,7915,2461],{},[25,7917,7918],{"class":27,"line":3351},[25,7919,2384],{},[25,7921,7922],{"class":27,"line":3356},[25,7923,2389],{},[25,7925,7926],{"class":27,"line":3361},[25,7927,2474],{},[25,7929,7930],{"class":27,"line":3366},[25,7931,2479],{},[25,7933,7934],{"class":27,"line":3371},[25,7935,2484],{},[25,7937,7938],{"class":27,"line":3376},[25,7939,2489],{},[25,7941,7942],{"class":27,"line":3381},[25,7943,2494],{},[25,7945,7946],{"class":27,"line":3386},[25,7947,2414],{},[25,7949,7950],{"class":27,"line":3391},[25,7951,2503],{},[25,7953,7954],{"class":27,"line":3396},[25,7955,2424],{},[25,7957,7958],{"class":27,"line":3401},[25,7959,1169],{},[25,7961,7962],{"class":27,"line":3406},[25,7963,1186],{},[25,7965,7966],{"class":27,"line":3411},[25,7967,32],{"emptyLinePlaceholder":31},[25,7969,7970],{"class":27,"line":3416},[25,7971,3419],{},[25,7973,7974],{"class":27,"line":3422},[25,7975,3425],{},[25,7977,7978],{"class":27,"line":3428},[25,7979,3431],{},[25,7981,7982],{"class":27,"line":3434},[25,7983,2542],{},[25,7985,7986],{"class":27,"line":3439},[25,7987,2547],{},[25,7989,7990],{"class":27,"line":3444},[25,7991,32],{"emptyLinePlaceholder":31},[25,7993,7994],{"class":27,"line":3449},[25,7995,3452],{},[25,7997,7998],{"class":27,"line":3455},[25,7999,32],{"emptyLinePlaceholder":31},[25,8001,8002],{"class":27,"line":3460},[25,8003,2556],{},[25,8005,8006],{"class":27,"line":3465},[25,8007,2561],{},[25,8009,8010],{"class":27,"line":3470},[25,8011,2566],{},[25,8013,8014],{"class":27,"line":3475},[25,8015,3478],{},[25,8017,8018],{"class":27,"line":3481},[25,8019,2576],{},[25,8021,8022],{"class":27,"line":3486},[25,8023,32],{"emptyLinePlaceholder":31},[25,8025,8026],{"class":27,"line":3491},[25,8027,3494],{},[25,8029,8030],{"class":27,"line":3497},[25,8031,2585],{},[25,8033,8034],{"class":27,"line":3502},[25,8035,1186],{},[25,8037,8038],{"class":27,"line":3507},[25,8039,32],{"emptyLinePlaceholder":31},[25,8041,8042],{"class":27,"line":3512},[25,8043,3515],{},[25,8045,8046],{"class":27,"line":3518},[25,8047,3521],{},[25,8049,8050],{"class":27,"line":3524},[25,8051,2537],{},[25,8053,8054],{"class":27,"line":3529},[25,8055,3532],{},[25,8057,8058],{"class":27,"line":3535},[25,8059,3538],{},[25,8061,8062],{"class":27,"line":3541},[25,8063,32],{"emptyLinePlaceholder":31},[25,8065,8066],{"class":27,"line":3546},[25,8067,2542],{},[25,8069,8070],{"class":27,"line":3551},[25,8071,2547],{},[25,8073,8074],{"class":27,"line":3556},[25,8075,32],{"emptyLinePlaceholder":31},[25,8077,8078],{"class":27,"line":3561},[25,8079,3564],{},[25,8081,8082],{"class":27,"line":3567},[25,8083,3570],{},[25,8085,8086],{"class":27,"line":3573},[25,8087,3576],{},[25,8089,8090],{"class":27,"line":3579},[25,8091,1186],{},[25,8093,8094],{"class":27,"line":3584},[25,8095,32],{"emptyLinePlaceholder":31},[25,8097,8098],{"class":27,"line":3589},[25,8099,3592],{},[25,8101,8102],{"class":27,"line":3595},[25,8103,3598],{},[25,8105,8106],{"class":27,"line":3601},[25,8107,2537],{},[25,8109,8110],{"class":27,"line":3606},[25,8111,32],{"emptyLinePlaceholder":31},[25,8113,8114],{"class":27,"line":3611},[25,8115,2673],{},[25,8117,8118],{"class":27,"line":3616},[25,8119,3619],{},[25,8121,8122],{"class":27,"line":3622},[25,8123,3625],{},[25,8125,8126],{"class":27,"line":3628},[25,8127,3631],{},[25,8129,8130],{"class":27,"line":3634},[25,8131,3637],{},[25,8133,8134],{"class":27,"line":3640},[25,8135,1526],{},[25,8137,8138],{"class":27,"line":3645},[25,8139,3648],{},[25,8141,8142],{"class":27,"line":3651},[25,8143,3654],{},[25,8145,8146],{"class":27,"line":3657},[25,8147,3660],{},[25,8149,8150],{"class":27,"line":3663},[25,8151,32],{"emptyLinePlaceholder":31},[25,8153,8154],{"class":27,"line":3668},[25,8155,1038],{},[25,8157,8158],{"class":27,"line":3673},[25,8159,32],{"emptyLinePlaceholder":31},[25,8161,8162],{"class":27,"line":3678},[25,8163,3681],{},[25,8165,8166],{"class":27,"line":3684},[25,8167,1186],{},[25,8169,8170],{"class":27,"line":3689},[25,8171,32],{"emptyLinePlaceholder":31},[25,8173,8174],{"class":27,"line":3694},[25,8175,2610],{},[25,8177,8178],{"class":27,"line":3699},[25,8179,2615],{},[25,8181,8182],{"class":27,"line":3704},[25,8183,2620],{},[25,8185,8186],{"class":27,"line":3709},[25,8187,2625],{},[25,8189,8190],{"class":27,"line":3714},[25,8191,2630],{},[25,8193,8194],{"class":27,"line":3719},[25,8195,2635],{},[25,8197,8198],{"class":27,"line":3724},[25,8199,2640],{},[25,8201,8202],{"class":27,"line":3729},[25,8203,2645],{},[25,8205,8206],{"class":27,"line":3734},[25,8207,2650],{},[25,8209,8210],{"class":27,"line":3739},[25,8211,1186],{},[25,8213,8214],{"class":27,"line":3744},[25,8215,32],{"emptyLinePlaceholder":31},[25,8217,8218],{"class":27,"line":3749},[25,8219,3752],{},[25,8221,8222],{"class":27,"line":3755},[25,8223,3758],{},[25,8225,8226],{"class":27,"line":3761},[25,8227,3764],{},[25,8229,8230],{"class":27,"line":3767},[25,8231,3770],{},[25,8233,8234],{"class":27,"line":3773},[25,8235,32],{"emptyLinePlaceholder":31},[25,8237,8238],{"class":27,"line":3778},[25,8239,3781],{},[25,8241,8242],{"class":27,"line":3784},[25,8243,3787],{},[25,8245,8246],{"class":27,"line":3790},[25,8247,1186],{},[25,8249,8250],{"class":27,"line":3795},[25,8251,32],{"emptyLinePlaceholder":31},[25,8253,8254],{"class":27,"line":3800},[25,8255,3803],{},[25,8257,8258],{"class":27,"line":3806},[25,8259,3809],{},[25,8261,8262],{"class":27,"line":3812},[25,8263,3764],{},[25,8265,8266],{"class":27,"line":3817},[25,8267,3820],{},[25,8269,8270],{"class":27,"line":3823},[25,8271,1186],{},[25,8273,8274],{"class":27,"line":3828},[25,8275,32],{"emptyLinePlaceholder":31},[25,8277,8278],{"class":27,"line":3833},[25,8279,3836],{},[25,8281,8282],{"class":27,"line":3839},[25,8283,3842],{},[25,8285,8286],{"class":27,"line":3845},[25,8287,3848],{},[25,8289,8290],{"class":27,"line":3851},[25,8291,3854],{},[25,8293,8294],{"class":27,"line":3857},[25,8295,3860],{},[25,8297,8298],{"class":27,"line":3863},[25,8299,32],{"emptyLinePlaceholder":31},[25,8301,8302],{"class":27,"line":3868},[25,8303,2673],{},[25,8305,8306],{"class":27,"line":3873},[25,8307,3876],{},[25,8309,8310],{"class":27,"line":3879},[25,8311,3882],{},[25,8313,8314],{"class":27,"line":3885},[25,8315,3888],{},[25,8317,8318],{"class":27,"line":3891},[25,8319,3894],{},[25,8321,8322],{"class":27,"line":3897},[25,8323,3900],{},[25,8325,8326],{"class":27,"line":3903},[25,8327,3906],{},[25,8329,8330],{"class":27,"line":3909},[25,8331,3912],{},[25,8333,8334],{"class":27,"line":3915},[25,8335,3918],{},[25,8337,8338],{"class":27,"line":3921},[25,8339,3924],{},[25,8341,8342],{"class":27,"line":3927},[25,8343,3930],{},[25,8345,8346],{"class":27,"line":3933},[25,8347,3936],{},[25,8349,8350],{"class":27,"line":3939},[25,8351,3942],{},[25,8353,8354],{"class":27,"line":3945},[25,8355,3948],{},[25,8357,8358],{"class":27,"line":3951},[25,8359,32],{"emptyLinePlaceholder":31},[25,8361,8362],{"class":27,"line":3956},[25,8363,3959],{},[25,8365,8366],{"class":27,"line":3962},[25,8367,3965],{},[25,8369,8370],{"class":27,"line":3968},[25,8371,3971],{},[25,8373,8374],{"class":27,"line":3974},[25,8375,3977],{},[25,8377,8378],{"class":27,"line":3980},[25,8379,3983],{},[25,8381,8382],{"class":27,"line":3986},[25,8383,3989],{},[25,8385,8386],{"class":27,"line":3992},[25,8387,3995],{},[25,8389,8390],{"class":27,"line":3998},[25,8391,4001],{},[25,8393,8394],{"class":27,"line":4004},[25,8395,4007],{},[25,8397,8398],{"class":27,"line":4010},[25,8399,4013],{},[25,8401,8402],{"class":27,"line":4016},[25,8403,4019],{},[25,8405,8406],{"class":27,"line":4022},[25,8407,4025],{},[25,8409,8410],{"class":27,"line":4028},[25,8411,32],{"emptyLinePlaceholder":31},[25,8413,8414],{"class":27,"line":4033},[25,8415,4036],{},[25,8417,8418],{"class":27,"line":4039},[25,8419,4042],{},[25,8421,8422],{"class":27,"line":4045},[25,8423,32],{"emptyLinePlaceholder":31},[25,8425,8426],{"class":27,"line":4050},[25,8427,4053],{},[25,8429,8430],{"class":27,"line":4056},[25,8431,4059],{},[25,8433,8434],{"class":27,"line":4062},[25,8435,4065],{},[25,8437,8438],{"class":27,"line":4068},[25,8439,4071],{},[25,8441,8442],{"class":27,"line":4074},[25,8443,4077],{},[25,8445,8446],{"class":27,"line":4080},[25,8447,2503],{},[25,8449,8450],{"class":27,"line":4085},[25,8451,1526],{},[25,8453,8454],{"class":27,"line":4090},[25,8455,2746],{},[25,8457,8458],{"class":27,"line":4095},[25,8459,4098],{},[25,8461,8462],{"class":27,"line":4101},[25,8463,1038],{},[25,8465,8466],{"class":27,"line":4106},[25,8467,1186],{},[25,8469,8470],{"class":27,"line":4111},[25,8471,32],{"emptyLinePlaceholder":31},[25,8473,8474],{"class":27,"line":4116},[25,8475,4119],{},[25,8477,8478],{"class":27,"line":4122},[25,8479,4125],{},[25,8481,8482],{"class":27,"line":4128},[25,8483,4131],{},[25,8485,8486],{"class":27,"line":4134},[25,8487,4137],{},[25,8489,8490],{"class":27,"line":4140},[25,8491,4143],{},[25,8493,8494],{"class":27,"line":4146},[25,8495,4149],{},[25,8497,8498],{"class":27,"line":4152},[25,8499,4155],{},[25,8501,8502],{"class":27,"line":4158},[25,8503,4161],{},[25,8505,8506],{"class":27,"line":4164},[25,8507,4167],{},[25,8509,8510],{"class":27,"line":4170},[25,8511,4173],{},[25,8513,8514],{"class":27,"line":4176},[25,8515,2414],{},[25,8517,8518],{"class":27,"line":4181},[25,8519,2503],{},[25,8521,8522],{"class":27,"line":4186},[25,8523,1526],{},[25,8525,8526],{"class":27,"line":4191},[25,8527,1169],{},[25,8529,8530],{"class":27,"line":4196},[25,8531,1186],{},[25,8533,8534],{"class":27,"line":4201},[25,8535,32],{"emptyLinePlaceholder":31},[25,8537,8538],{"class":27,"line":4206},[25,8539,4209],{},[25,8541,8542],{"class":27,"line":4212},[25,8543,4215],{},[25,8545,8546],{"class":27,"line":4218},[25,8547,4221],{},[25,8549,8550],{"class":27,"line":4224},[25,8551,4227],{},[25,8553,8554],{"class":27,"line":4230},[25,8555,32],{"emptyLinePlaceholder":31},[25,8557,8558],{"class":27,"line":4235},[25,8559,32],{"emptyLinePlaceholder":31},[25,8561,8562],{"class":27,"line":4240},[25,8563,1186],{},[25,8565,8566],{"class":27,"line":4245},[25,8567,32],{"emptyLinePlaceholder":31},[25,8569,8570],{"class":27,"line":4250},[25,8571,4253],{},[25,8573,8574],{"class":27,"line":4256},[25,8575,4259],{},[25,8577,8578],{"class":27,"line":4262},[25,8579,3764],{},[25,8581,8582],{"class":27,"line":4267},[25,8583,4270],{},[25,8585,8586],{"class":27,"line":4273},[25,8587,4276],{},[25,8589,8590],{"class":27,"line":4279},[25,8591,1186],{},[25,8593,8594],{"class":27,"line":4284},[25,8595,32],{"emptyLinePlaceholder":31},[25,8597,8598],{"class":27,"line":4289},[25,8599,2806],{},[25,8601,8602],{"class":27,"line":4294},[25,8603,2811],{},[25,8605,8606],{"class":27,"line":4299},[25,8607,2816],{},[25,8609,8610],{"class":27,"line":4304},[25,8611,2821],{},[25,8613,8614],{"class":27,"line":4309},[25,8615,2826],{},[25,8617,8618],{"class":27,"line":4314},[25,8619,1169],{},[25,8621,8622],{"class":27,"line":4319},[25,8623,32],{"emptyLinePlaceholder":31},[25,8625,8626],{"class":27,"line":4324},[25,8627,2839],{},[25,8629,8630],{"class":27,"line":4329},[25,8631,2844],{},[25,8633,8634],{"class":27,"line":4334},[25,8635,2849],{},[25,8637,8638],{"class":27,"line":4339},[25,8639,2854],{},[25,8641,8642],{"class":27,"line":4344},[25,8643,2859],{},[25,8645,8646],{"class":27,"line":4349},[25,8647,1186],{},[11,8649,4354],{"id":4354},[1402,8651,8652,8660,8670],{},[307,8653,4359,8654],{},[304,8655,8656,8658],{},[307,8657,4364],{},[307,8659,4367],{},[307,8661,4370,8662],{},[304,8663,8664,8666,8668],{},[307,8665,4375],{},[307,8667,4378],{},[307,8669,4381],{},[307,8671,4384,8672],{},[304,8673,8674,8676,8678],{},[307,8675,4389],{},[307,8677,4392],{},[307,8679,4395],{},[11,8681,518],{"id":518},[238,8683,4400],{},[238,8685,4403],{},[11,8687,4406],{"id":4406},[304,8689,8690,8695,8700],{},[307,8691,8692],{},[1544,8693,4415],{"href":4413,"rel":8694},[1548],[307,8696,8697],{},[1544,8698,4422],{"href":4420,"rel":8699},[1548],[307,8701,8702],{},[1544,8703,4429],{"href":4427,"rel":8704},[1548],[208,8706,210],{},{"title":20,"searchDepth":35,"depth":35,"links":8708},[8709,8710,8714,8724,8729,8730,8731,8732,8733],{"id":890,"depth":35,"text":890},{"id":2258,"depth":35,"text":2258,"children":8711},[8712,8713],{"id":2261,"depth":41,"text":2261},{"id":2278,"depth":41,"text":2278},{"id":2295,"depth":35,"text":2295,"children":8715},[8716,8717,8718,8719,8720,8721,8722,8723],{"id":2298,"depth":41,"text":2299},{"id":2345,"depth":41,"text":2346},{"id":2349,"depth":41,"text":2349},{"id":2431,"depth":41,"text":2431},{"id":2518,"depth":41,"text":2519},{"id":2522,"depth":41,"text":2522},{"id":2592,"depth":41,"text":2593},{"id":2657,"depth":41,"text":2658},{"id":2762,"depth":35,"text":2762,"children":8725},[8726,8727,8728],{"id":2765,"depth":41,"text":2766},{"id":2780,"depth":41,"text":2781},{"id":2795,"depth":41,"text":2796},{"id":2866,"depth":35,"text":2286},{"id":2889,"depth":35,"text":2889},{"id":4354,"depth":35,"text":4354},{"id":518,"depth":35,"text":518},{"id":4406,"depth":35,"text":4406},[1443],{},{"title":2245,"description":4461},[1443,1452,4467,1451,4468],{"id":4471,"title":4472,"body":8739,"categories":8803,"cross_post":215,"date":4559,"description":4560,"extension":218,"image":20,"meta":8804,"navigation":31,"note_id":215,"note_url":215,"path":4562,"private":221,"qiita_id":215,"qiita_url":215,"seo":8805,"stem":4564,"tags":8806,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":4567},{"type":8,"value":8740,"toc":8798},[8741,8743,8748,8750,8752,8762,8764,8768,8770,8782,8784,8788,8790,8796],[238,8742,4477],{},[238,8744,8745],{},[1544,8746,4482],{"href":4482,"rel":8747},[1548],[11,8749,4486],{"id":4486},[238,8751,4489],{},[304,8753,8754,8756,8758,8760],{},[307,8755,4494],{},[307,8757,4497],{},[307,8759,4500],{},[307,8761,4503],{},[238,8763,4506],{},[11,8765,8766],{"id":4509},[904,8767,4509],{},[238,8769,4514],{},[1402,8771,8772,8780],{},[307,8773,4519,8774],{},[304,8775,8776,8778],{},[307,8777,4524],{},[307,8779,4527],{},[307,8781,4530],{},[238,8783,4533],{},[11,8785,8786],{"id":4536},[904,8787,4536],{},[238,8789,4541],{},[1402,8791,8792,8794],{},[307,8793,4546],{},[307,8795,4549],{},[238,8797,4552],{},{"title":20,"searchDepth":35,"depth":35,"links":8799},[8800,8801,8802],{"id":4486,"depth":35,"text":4486},{"id":4509,"depth":35,"text":4509},{"id":4536,"depth":35,"text":4536},[1443],{},{"title":4472,"description":4560},[1443,4566],{"id":4569,"title":4570,"body":8808,"categories":8832,"cross_post":215,"date":4604,"description":4605,"extension":218,"image":20,"meta":8833,"navigation":31,"note_id":215,"note_url":215,"path":4607,"private":221,"qiita_id":215,"qiita_url":215,"seo":8834,"stem":4609,"tags":8835,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":4611},{"type":8,"value":8809,"toc":8830},[8810],[304,8811,8812,8814,8822,8826],{},[307,8813,4577],{},[307,8815,4580,8816],{},[304,8817,8818,8820],{},[307,8819,4585],{},[307,8821,4588],{},[307,8823,4591,8824],{},[904,8825,4594],{},[307,8827,4597,8828],{},[904,8829,4600],{},{"title":20,"searchDepth":35,"depth":35,"links":8831},[],[1443],{},{"title":4570,"description":4605},[1443,4566],{"id":4613,"title":4614,"body":8837,"categories":9239,"cross_post":215,"date":4460,"description":5095,"extension":218,"image":20,"meta":9240,"navigation":31,"note_id":215,"note_url":215,"path":5097,"private":221,"qiita_id":215,"qiita_url":215,"seo":9241,"stem":5099,"tags":9242,"topics":215,"updated":215,"zenn_emoji":215,"zenn_slug":215,"zenn_type":215,"zenn_url":215,"__hash__":5102},{"type":8,"value":8838,"toc":9233},[8839,8843,8845,8847,8857,8859,8861,8863,9219,9221,9226,9231],[11,8840,8841],{"id":4619},[904,8842,4619],{},[238,8844,4624],{},[1204,8846,4628],{"id":4627},[304,8848,8849,8851,8853,8855],{},[307,8850,4633],{},[307,8852,4636],{},[307,8854,4639],{},[307,8856,4642],{},[1204,8858,4645],{"id":4645},[238,8860,4648],{},[238,8862,4651],{},[15,8864,8865],{"className":17,"code":4654,"language":19,"meta":20,"style":20},[22,8866,8867,8871,8875,8879,8883,8887,8891,8895,8899,8903,8907,8911,8915,8919,8923,8927,8931,8935,8939,8943,8947,8951,8955,8959,8963,8967,8971,8975,8979,8983,8987,8991,8995,8999,9003,9007,9011,9015,9019,9023,9027,9031,9035,9039,9043,9047,9051,9055,9059,9063,9067,9071,9075,9079,9083,9087,9091,9095,9099,9103,9107,9111,9115,9119,9123,9127,9131,9135,9139,9143,9147,9151,9155,9159,9163,9167,9171,9175,9179,9183,9187,9191,9195,9199,9203,9207,9211,9215],{"__ignoreMap":20},[25,8868,8869],{"class":27,"line":28},[25,8870,32],{"emptyLinePlaceholder":31},[25,8872,8873],{"class":27,"line":35},[25,8874,4665],{},[25,8876,8877],{"class":27,"line":41},[25,8878,4670],{},[25,8880,8881],{"class":27,"line":46},[25,8882,32],{"emptyLinePlaceholder":31},[25,8884,8885],{"class":27,"line":52},[25,8886,32],{"emptyLinePlaceholder":31},[25,8888,8889],{"class":27,"line":58},[25,8890,32],{"emptyLinePlaceholder":31},[25,8892,8893],{"class":27,"line":63},[25,8894,32],{"emptyLinePlaceholder":31},[25,8896,8897],{"class":27,"line":69},[25,8898,4691],{},[25,8900,8901],{"class":27,"line":75},[25,8902,4696],{},[25,8904,8905],{"class":27,"line":80},[25,8906,4701],{},[25,8908,8909],{"class":27,"line":86},[25,8910,4706],{},[25,8912,8913],{"class":27,"line":92},[25,8914,4711],{},[25,8916,8917],{"class":27,"line":97},[25,8918,4716],{},[25,8920,8921],{"class":27,"line":103},[25,8922,32],{"emptyLinePlaceholder":31},[25,8924,8925],{"class":27,"line":109},[25,8926,32],{"emptyLinePlaceholder":31},[25,8928,8929],{"class":27,"line":114},[25,8930,4729],{},[25,8932,8933],{"class":27,"line":120},[25,8934,4734],{},[25,8936,8937],{"class":27,"line":126},[25,8938,32],{"emptyLinePlaceholder":31},[25,8940,8941],{"class":27,"line":132},[25,8942,32],{"emptyLinePlaceholder":31},[25,8944,8945],{"class":27,"line":138},[25,8946,4747],{},[25,8948,8949],{"class":27,"line":144},[25,8950,32],{"emptyLinePlaceholder":31},[25,8952,8953],{"class":27,"line":150},[25,8954,4756],{},[25,8956,8957],{"class":27,"line":156},[25,8958,4761],{},[25,8960,8961],{"class":27,"line":162},[25,8962,4766],{},[25,8964,8965],{"class":27,"line":168},[25,8966,4771],{},[25,8968,8969],{"class":27,"line":174},[25,8970,4776],{},[25,8972,8973],{"class":27,"line":180},[25,8974,4781],{},[25,8976,8977],{"class":27,"line":186},[25,8978,2650],{},[25,8980,8981],{"class":27,"line":191},[25,8982,32],{"emptyLinePlaceholder":31},[25,8984,8985],{"class":27,"line":197},[25,8986,4756],{},[25,8988,8989],{"class":27,"line":203},[25,8990,4798],{},[25,8992,8993],{"class":27,"line":1084},[25,8994,4766],{},[25,8996,8997],{"class":27,"line":1090},[25,8998,4771],{},[25,9000,9001],{"class":27,"line":1096},[25,9002,4811],{},[25,9004,9005],{"class":27,"line":1102},[25,9006,4816],{},[25,9008,9009],{"class":27,"line":1108},[25,9010,4821],{},[25,9012,9013],{"class":27,"line":1113},[25,9014,4826],{},[25,9016,9017],{"class":27,"line":1119},[25,9018,32],{"emptyLinePlaceholder":31},[25,9020,9021],{"class":27,"line":1125},[25,9022,4835],{},[25,9024,9025],{"class":27,"line":1131},[25,9026,1526],{},[25,9028,9029],{"class":27,"line":1137},[25,9030,2650],{},[25,9032,9033],{"class":27,"line":1143},[25,9034,32],{"emptyLinePlaceholder":31},[25,9036,9037],{"class":27,"line":1149},[25,9038,4852],{},[25,9040,9041],{"class":27,"line":1154},[25,9042,4857],{},[25,9044,9045],{"class":27,"line":1160},[25,9046,4862],{},[25,9048,9049],{"class":27,"line":1166},[25,9050,4867],{},[25,9052,9053],{"class":27,"line":1172},[25,9054,4872],{},[25,9056,9057],{"class":27,"line":1177},[25,9058,4877],{},[25,9060,9061],{"class":27,"line":1183},[25,9062,32],{"emptyLinePlaceholder":31},[25,9064,9065],{"class":27,"line":3174},[25,9066,4886],{},[25,9068,9069],{"class":27,"line":3179},[25,9070,4891],{},[25,9072,9073],{"class":27,"line":3184},[25,9074,4896],{},[25,9076,9077],{"class":27,"line":3189},[25,9078,4901],{},[25,9080,9081],{"class":27,"line":3194},[25,9082,4906],{},[25,9084,9085],{"class":27,"line":3199},[25,9086,4911],{},[25,9088,9089],{"class":27,"line":3204},[25,9090,4916],{},[25,9092,9093],{"class":27,"line":3209},[25,9094,4921],{},[25,9096,9097],{"class":27,"line":3214},[25,9098,4926],{},[25,9100,9101],{"class":27,"line":3219},[25,9102,2503],{},[25,9104,9105],{"class":27,"line":3224},[25,9106,4935],{},[25,9108,9109],{"class":27,"line":3229},[25,9110,32],{"emptyLinePlaceholder":31},[25,9112,9113],{"class":27,"line":3234},[25,9114,4944],{},[25,9116,9117],{"class":27,"line":3239},[25,9118,4949],{},[25,9120,9121],{"class":27,"line":3244},[25,9122,32],{"emptyLinePlaceholder":31},[25,9124,9125],{"class":27,"line":3249},[25,9126,32],{"emptyLinePlaceholder":31},[25,9128,9129],{"class":27,"line":3254},[25,9130,4962],{},[25,9132,9133],{"class":27,"line":3259},[25,9134,4967],{},[25,9136,9137],{"class":27,"line":3264},[25,9138,4972],{},[25,9140,9141],{"class":27,"line":3269},[25,9142,4977],{},[25,9144,9145],{"class":27,"line":3274},[25,9146,4982],{},[25,9148,9149],{"class":27,"line":3279},[25,9150,4987],{},[25,9152,9153],{"class":27,"line":3284},[25,9154,4992],{},[25,9156,9157],{"class":27,"line":3289},[25,9158,4997],{},[25,9160,9161],{"class":27,"line":3294},[25,9162,5002],{},[25,9164,9165],{"class":27,"line":3299},[25,9166,5007],{},[25,9168,9169],{"class":27,"line":3304},[25,9170,5012],{},[25,9172,9173],{"class":27,"line":3310},[25,9174,5017],{},[25,9176,9177],{"class":27,"line":3316},[25,9178,5022],{},[25,9180,9181],{"class":27,"line":3321},[25,9182,5027],{},[25,9184,9185],{"class":27,"line":3326},[25,9186,5032],{},[25,9188,9189],{"class":27,"line":3331},[25,9190,5037],{},[25,9192,9193],{"class":27,"line":3336},[25,9194,5042],{},[25,9196,9197],{"class":27,"line":3341},[25,9198,5047],{},[25,9200,9201],{"class":27,"line":3346},[25,9202,5037],{},[25,9204,9205],{"class":27,"line":3351},[25,9206,32],{"emptyLinePlaceholder":31},[25,9208,9209],{"class":27,"line":3356},[25,9210,5060],{},[25,9212,9213],{"class":27,"line":3361},[25,9214,2576],{},[25,9216,9217],{"class":27,"line":3366},[25,9218,2342],{},[238,9220,2215],{},[238,9222,9223],{},[1544,9224,5077],{"href":5075,"rel":9225},[1548],[238,9227,9228],{},[1544,9229,5084],{"href":5082,"rel":9230},[1548],[208,9232,210],{},{"title":20,"searchDepth":35,"depth":35,"links":9234},[9235],{"id":4619,"depth":35,"text":4619,"children":9236},[9237,9238],{"id":4627,"depth":41,"text":4628},{"id":4645,"depth":41,"text":4645},[5094],{},{"title":4614,"description":5095},[1443,1451,5094,5101],1788430702350]